Commit c7cf59f0 authored by Christian's avatar Christian 💬

login/logout in hook scripts

parent fef314b7
......@@ -11,13 +11,17 @@ variables:
pushtag: "${CI_REGISTRY}/${CI_PROJECT_NAMESPACE}/${CI_PROJECT_NAME}:${imageversion}"
before_script:
- 'chmod a+x build.sh'
- "docker login -u gitlab-ci-token -p $CI_JOB_TOKEN ${CI_REGISTRY}"
after_script:
- "docker logout ${CI_REGISTRY}"
build:
stage: build
script:
- 'curl "${rootfsurl}" > rootfs.tar.gz'
- 'echo "${rootfssha256sum} rootfs.tar.gz" | sha256sum -c &> /dev/null || exit 98'
- 'chmod a+x build.sh'
- "./build.sh --rootfstarfile rootfs.tar.gz --imagename ${pushtag}"
- 'rm -f rootfs.tar.gz'
......@@ -27,9 +31,7 @@ deploy:
- tags
- triggers
script:
- "docker login -u gitlab-ci-token -p $CI_JOB_TOKEN ${CI_REGISTRY}"
- "docker push ${pushtag}"
- "docker logout ${CI_REGISTRY}"
cleanup:
stage: cleanup
......
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