Add CI that tests reproducability success and failure

parent 8ce545fc
Pipeline #1523 canceled with stages
image: docker:git
services:
- docker:dind
stages:
- build
- test
- release
variables:
TEST_IMAGE: registry.gitlab.com/${CI_PROJECT_NAMESPACE}/${CI_PROJECT_NAME}:${CI_BUILD_REF_NAME}
RELEASE_IMAGE: registry.gitlab.com/${CI_PROJECT_NAMESPACE}/${CI_PROJECT_NAME}:latest
before_script:
- echo ${CI_BUILD_TOKEN} | docker login -u gitlab-ci-token --password-stdin registry.gitlab.com
build:
stage: build
script:
- docker build -t ${TEST_IMAGE} .
- docker push $TEST_IMAGE
test_success:
stage: test
script:
- docker run ${TEST_IMAGE} ./reproduce.py release-1.0.1
test_failure:
stage: test
script:
- ! docker run ${TEST_IMAGE} ./reproduce.py release-1.0.3
release:
stage: release
script:
- docker pull $TEST_IMAGE
- docker tag $TEST_IMAGE $RELEASE_IMAGE
- docker push $RELEASE_IMAGE
only:
- master
- tags
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