Commit 4e9153d3 authored by David Schäfer's avatar David Schäfer
Browse files

Merge branch 'schaefed-master-patch-52691' into 'master'

Simplify CI-pipeline

See merge request !4
parents 817fa919 01e10650
......@@ -3,9 +3,7 @@ variables:
stages:
- test
- config
- build
# - sync
test:
stage: test
......@@ -18,32 +16,6 @@ test:
- pytest tests/test.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"
script:
- git fetch --all
- 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
stage: build
......@@ -51,30 +23,9 @@ build:
name: gcr.io/kaniko-project/executor:debug
entrypoint: [""]
only:
- pipeline
- master
variables:
IMAGE_NAME: $CI_REGISTRY/rdm/pipelines/crns:latest
script:
- 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
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