Skip to content
Snippets Groups Projects
Commit 00c95925 authored by Sören Henning's avatar Sören Henning
Browse files

Aling kaniko job with GitLab example

parent a02063f8
No related branches found
No related tags found
1 merge request!207Container build without Docker
Pipeline #5503 passed with warnings
...@@ -319,10 +319,11 @@ deploy-theodolite-kaniko: ...@@ -319,10 +319,11 @@ deploy-theodolite-kaniko:
image: image:
name: gcr.io/kaniko-project/executor:debug name: gcr.io/kaniko-project/executor:debug
entrypoint: [""] entrypoint: [""]
before_script:
- mkdir -p /kaniko/.docker
- echo "{\"auths\":{\"${CR_HOST}\":{\"auth\":\"$(printf "%s:%s" "${CR_USER}" "${CR_PW}" | base64 | tr -d '\n')\"}}}" > /kaniko/.docker/config.json
script: script:
- DOCKER_TAG_NAME=$(echo $CI_COMMIT_REF_SLUG- | sed 's/^master-$//') - DOCKER_TAG_NAME=$(echo $CI_COMMIT_REF_SLUG- | sed 's/^master-$//')
- mkdir -p /kaniko/.docker
- echo "{\"auths\":{\"$CR_HOST\":{\"username\":\"$CR_USER\",\"password\":\"$CR_PW\"}}}" > /kaniko/.docker/config.json
- /kaniko/executor --context $PWD --dockerfile $PWD/src/main/docker/Dockerfile.jvm -d $CR_HOST/$CR_ORG/theodolite:${DOCKER_TAG_NAME}latest-kaniko - /kaniko/executor --context $PWD --dockerfile $PWD/src/main/docker/Dockerfile.jvm -d $CR_HOST/$CR_ORG/theodolite:${DOCKER_TAG_NAME}latest-kaniko
rules: rules:
- if: "$CR_HOST && $CR_ORG && $CR_USER && $CR_PW && $CI_COMMIT_TAG" - if: "$CR_HOST && $CR_ORG && $CR_USER && $CR_PW && $CI_COMMIT_TAG"
......
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