Skip to content

Instantly share code, notes, and snippets.

@Storager
Created August 6, 2019 06:54
Show Gist options
  • Select an option

  • Save Storager/c7130e302599c8a6ee69bbc461a434d7 to your computer and use it in GitHub Desktop.

Select an option

Save Storager/c7130e302599c8a6ee69bbc461a434d7 to your computer and use it in GitHub Desktop.
gitlab pipeline example
image: docker:latest
services:
- docker:dind
stages:
- build
- test
- release
- deploy
variables:
DOCKER_CI_IMAGE: registry.gitlab.com/storager/udemy-kube:$CI_BUILD_REF_NAME
before_script:
- docker login -u gitlab-ci-token -p $CI_BUILD_TOKEN registry.gitlab.com
build-image:
stage: build
tags:
- docker
script:
- docker build --pull -t $DOCKER_CI_IMAGE .
- docker push $DOCKER_CI_IMAGE
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment