Skip to content
Snippets Groups Projects
Commit 5c7df1d7 authored by Johannes Zumthurm's avatar Johannes Zumthurm
Browse files

Update .gitlab-ci.yml file

parent 7b536a31
Branches how_to_ersti_24
No related tags found
1 merge request!131Update .gitlab-ci.yml file
Pipeline #276415 passed
......@@ -14,63 +14,37 @@ eslint:
build_master:
stage: build
image: docker:stable
variables:
GIT_SUBMODULE_STRATEGY: normal
DOCKER_DRIVER: overlay2
services:
- docker:dind
before_script:
- docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY
- echo "$CI_DOCKER_REGISTRY_TOKEN" | docker login -u "$CI_DOCKER_REGISTRY_USER" --password-stdin
script:
- docker build --cache-from "$CI_REGISTRY_IMAGE:latest" --pull -t "$CI_REGISTRY_IMAGE:latest" ./
- docker push "$CI_REGISTRY_IMAGE:latest"
- docker build --pull -t "$CI_REGISTRY_IMAGE" ./
- docker push "$CI_REGISTRY_IMAGE"
only:
- master
environment:
name: production
url: https://amiv.ethz.ch
build_dev:
stage: build
image: docker:stable
variables:
GIT_SUBMODULE_STRATEGY: normal
DOCKER_DRIVER: overlay2
services:
- docker:dind
before_script:
- docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY
- echo "$CI_DOCKER_REGISTRY_TOKEN_DEV" | docker login -u "$CI_DOCKER_REGISTRY_USER_DEV" --password-stdin
script:
- docker build --cache-from "$CI_REGISTRY_IMAGE:dev" --pull -t "$CI_REGISTRY_IMAGE:dev" ./
- docker push "$CI_REGISTRY_IMAGE:dev"
except:
- schedules
- docker build --pull -t "$CI_REGISTRY_IMAGE_DEV" ./
- docker push "$CI_REGISTRY_IMAGE_DEV"
environment:
name: development
url: https://web-dev.amiv.ethz.ch
deploy_dev:
stage: deploy
image: amiveth/service-update-helper
before_script:
- export CI_DEPLOY_SERVICE="${CI_DEPLOY_SERVICE}-dev"
script:
- /update.py
except:
- schedules
allow_failure: true
deploy_cluster:
deploy:
stage: deploy
image: amiveth/service-update-helper
image: amiveth/ansible-ci-helper
script:
- /update.py
only:
- master
deploy_fallback:
stage: deploy
image: amiveth/service-update-helper
before_script:
- export CI_DEPLOY_URL="$CI_DEPLOY_URL_FALLBACK"
script:
- /update.py
only:
- master
- python /main.py
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment