build the remote-repo job only on master

This commit is contained in:
Georges Dupéron 2019-05-28 18:41:18 +02:00
parent 9059c3c2f1
commit 8789004f43

View File

@ -17,7 +17,7 @@ stages:
.docker_build: &docker_build .docker_build: &docker_build
script: script:
- docker build -t $LIGO_REGISTRY_IMAGE:latest -f ./docker/Dockerfile . - docker build -t $LIGO_REGISTRY_IMAGE:latest -f ./docker/Dockerfile .
.before_script: &before_script .before_script: &before_script
before_script: before_script:
# Install dependencies # Install dependencies
@ -80,6 +80,8 @@ remote-repo-job:
#- opam install -y merlin #- opam install -y merlin
#- opam install -y ocp-indent #- opam install -y ocp-indent
#- opam user-setup install #- opam user-setup install
only:
- master
# Run a docker build without publishing to the registry # Run a docker build without publishing to the registry
build-current-docker-image: build-current-docker-image:
@ -94,7 +96,7 @@ build-current-docker-image:
build-and-publish-latest-docker-image: build-and-publish-latest-docker-image:
stage: build_and_deploy_docker stage: build_and_deploy_docker
<<: *docker <<: *docker
<<: *docker_build <<: *docker_build
after_script: after_script:
- docker login -u $LIGO_REGISTRY_USER -p $LIGO_REGISTRY_PASSWORD - docker login -u $LIGO_REGISTRY_USER -p $LIGO_REGISTRY_PASSWORD
- docker push $LIGO_REGISTRY_IMAGE:latest - docker push $LIGO_REGISTRY_IMAGE:latest