vibe-docker/.gitlab-ci.yml

23 lines
619 B
YAML
Raw Normal View History

2018-11-28 23:09:54 +01:00
image: docker:stable
before_script:
2018-11-29 01:06:35 +01:00
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
2018-11-28 23:09:54 +01:00
build-master:
stage: build
script:
2018-11-29 01:06:35 +01:00
- docker pull $CI_REGISTRY_IMAGE:latest || true
- docker build --cache-from $CI_REGISTRY_IMAGE:latest -t $CI_REGISTRY_IMAGE:latest .
- docker push $CI_REGISTRY_IMAGE
2018-11-28 23:09:54 +01:00
only:
- master
build:
stage: build
script:
2018-11-29 01:06:35 +01:00
- docker pull $CI_REGISTRY_IMAGE:latest || true
- docker build --cache-from $CI_REGISTRY_IMAGE:latest -t $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG .
- docker push $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG
2018-11-28 23:09:54 +01:00
except:
- master