diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index f2ee30c308aac234bb71ad9fb28f798515e5d680..8532ef98d7087665641b309cfcc7fdae72057491 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -319,10 +319,11 @@ deploy-theodolite-kaniko: image: name: gcr.io/kaniko-project/executor:debug 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: - 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 rules: - if: "$CR_HOST && $CR_ORG && $CR_USER && $CR_PW && $CI_COMMIT_TAG"