From 1de4fe1de57387ca937055257bee5b5b176bae69 Mon Sep 17 00:00:00 2001 From: kwadronaut Date: Sun, 22 Apr 2018 15:20:38 +0200 Subject: CI use a stretch image 'deploy_test:jessie:master' will deploy to jessie, the packages that are in the 'master' debian repository (stable), the 'except master, stretch' will tell it to not deploy when something to these branches is pushed. Fixes #8920 Related #8916 --- .gitlab-ci.yml | 27 ++++++++++++++++++++++++-- tests/platform-ci/ci-build.sh | 1 + tests/platform-ci/provider/cloud.json.template | 2 +- 3 files changed, 27 insertions(+), 3 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 8656104a..d9b79c8e 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -40,15 +40,38 @@ catalog: script: - su -c '/usr/local/bin/bundle exec rake catalog' cirunner -deploy_test:master: +deploy_test:jessie:master: stage: deploy except: - master + - stretch script: - su -c 'set -o pipefail; stdbuf -oL -eL ./ci-build.sh | ts' cirunner -deploy_test:staging: +deploy_test:jessie:staging: stage: deploy + except: + - stretch + variables: + COMPONENT: "staging" + script: + - su -c 'set -o pipefail; stdbuf -oL -eL ./ci-build.sh | ts' cirunner + +deploy_test:stretch:master: + image: 0xacab.org:4567/leap/docker/ruby:stretch_amd64 + stage: deploy + only: + - stretch + allow_failure: true + script: + - su -c 'set -o pipefail; stdbuf -oL -eL ./ci-build.sh | ts' cirunner + +deploy_test:stretch:staging: + image: 0xacab.org:4567/leap/docker/ruby:stretch_amd64 + stage: deploy + only: + - stretch + allow_failure: true variables: COMPONENT: "staging" script: diff --git a/tests/platform-ci/ci-build.sh b/tests/platform-ci/ci-build.sh index 59b399ee..5856fbb7 100755 --- a/tests/platform-ci/ci-build.sh +++ b/tests/platform-ci/ci-build.sh @@ -132,6 +132,7 @@ build_from_scratch() { [ -z "$AWS_SECRET_KEY" ] && fail "\$AWS_SECRET_KEY is not set - please provide it as env variable." /usr/bin/jq ".platform_ci.auth |= .+ {\"aws_access_key_id\":\"$AWS_ACCESS_KEY\", \"aws_secret_access_key\":\"$AWS_SECRET_KEY\"}" < cloud.json.template > cloud.json + # Enable xtrace again only if it was set at beginning of script [[ $xtrace == true ]] && set -x diff --git a/tests/platform-ci/provider/cloud.json.template b/tests/platform-ci/provider/cloud.json.template index 28152e82..18faf40f 100644 --- a/tests/platform-ci/provider/cloud.json.template +++ b/tests/platform-ci/provider/cloud.json.template @@ -7,7 +7,7 @@ "aws_access_key_id": "", "aws_secret_access_key": "" }, - "default_image": "ami-2a34e94a", + "default_image": "ami-310d6c49", "default_options": { "InstanceType": "t2.small" } -- cgit v1.2.3