Commit 09f4479d authored by Christian's avatar Christian 💬

fix ci logic

parent c7cf59f0
stages:
- build
- testbuild
- deploy
- cleanup
variables:
imageversion: "2.2"
......@@ -12,28 +11,32 @@ variables:
before_script:
- "docker login -u gitlab-ci-token -p $CI_JOB_TOKEN ${CI_REGISTRY}"
- 'curl "${rootfsurl}" > rootfs.tar.gz'
- 'echo "${rootfssha256sum} rootfs.tar.gz" | sha256sum -c &> /dev/null || exit 98'
- 'chmod a+x build.sh'
after_script:
- 'rm -f rootfs.tar.gz'
- "docker logout ${CI_REGISTRY}"
- "docker image prune -a -f"
build:
stage: build
testbuild:
stage: testbuild
except:
- tags
- triggers
tags:
- docker
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'
deploy:
stage: deploy
only:
- tags
- triggers
tags:
- docker
script:
- "./build.sh --rootfstarfile rootfs.tar.gz --imagename ${pushtag}"
- "docker push ${pushtag}"
cleanup:
stage: cleanup
script:
- "docker image prune -a -f"
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