Commit 55dd1d51 authored by David Schäfer's avatar David Schäfer
Browse files

Update .gitlab-ci.yml

parent bf02238f
......@@ -3,9 +3,9 @@ variables:
stages:
- test
- config
# - config
- build
- sync
# - sync
test:
stage: test
......@@ -18,30 +18,30 @@ test:
- pytest tests/tests.py
- snakemake -j1 --dry-run
config:
# propagate changes to the directories
# config and manual to the branch pipeline
stage: config
only:
refs:
- master
changes:
- config/*
- manual/*
before_script:
- apt -y update && apt -y install git
- git config user.email "runner@git.ufz.de"
- git config user.name "Gitlab Runner"
#config:
# # propagate changes to the directories
# # config and manual to the branch pipeline
# stage: config
# only:
# refs:
# - master
# changes:
# - config/*
# - manual/*
#
# before_script:
# - apt -y update && apt -y install git
# - git config user.email "runner@git.ufz.de"
# - git config user.name "Gitlab Runner"
script:
- git checkout origin/pipeline
- git checkout origin/master -- config
- git checkout origin/master -- manual
- git commit -m 'merge config/manual updates' || true
# $CI_DEPLOY_TOKEN is personal (i.e. schaefed)
# access token stored in a CI/CD variable
- git push http://schaefed:${CI_DEPLOY_TOKEN}@git.ufz.de/rdm/pipelines/crns HEAD:pipeline
# script:
# - git checkout origin/pipeline
# - git checkout origin/master -- config
# - git checkout origin/master -- manual
# - git commit -m 'merge config/manual updates' || true
# # $CI_DEPLOY_TOKEN is personal (i.e. schaefed)
# # access token stored in a CI/CD variable
# - git push http://schaefed:${CI_DEPLOY_TOKEN}@git.ufz.de/rdm/pipelines/crns HEAD:pipeline
build:
# build and push the pipeline image
......@@ -57,23 +57,23 @@ build:
- echo "{\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$CI_REGISTRY_USER\",\"password\":\"$CI_REGISTRY_PASSWORD\"}}}" > /kaniko/.docker/config.json
- /kaniko/executor --context $CI_PROJECT_DIR --dockerfile $CI_PROJECT_DIR/Dockerfile --destination $IMAGE_NAME
sync:
# propagate changes from the pipeline branch to master
stage: sync
only:
refs:
- pipeline
before_script:
- apt -y update && apt -y install git
- git config user.email "runner@git.ufz.de"
- git config user.name "Gitlab Runner"
script:
- git fetch --all
- git checkout pipeline
- git pull
- git checkout master
- git pull
- git merge pipeline
# $CI_DEPLOY_TOKEN is personal (i.e. schaefed)
# access token stored in a CI/CD variable
- git push http://schaefed:${CI_DEPLOY_TOKEN}@git.ufz.de/rdm/pipelines/crns HEAD:master
#sync:
# # propagate changes from the pipeline branch to master
# stage: sync
# only:
# refs:
# - pipeline
# before_script:
# - apt -y update && apt -y install git
# - git config user.email "runner@git.ufz.de"
# - git config user.name "Gitlab Runner"
# script:
# - git fetch --all
# - git checkout pipeline
# - git pull
# - git checkout master
# - git pull
# - git merge pipeline
# # $CI_DEPLOY_TOKEN is personal (i.e. schaefed)
# # access token stored in a CI/CD variable
# - git push http://schaefed:${CI_DEPLOY_TOKEN}@git.ufz.de/rdm/pipelines/crns HEAD:master
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment