From f4849b474c560c1b418ab96b9db2e9c549cc1353 Mon Sep 17 00:00:00 2001 From: Sumner Evans Date: Fri, 17 Sep 2021 12:21:22 -0400 Subject: [PATCH] ci: deploy to dev stable and internal automatically --- .gitlab-ci.yml | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index d007da7..01dda36 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -55,10 +55,28 @@ build docker amd64: DOCKER_ARCH: amd64 after_script: - | - if [ "$CI_COMMIT_BRANCH" = "master" ]; then - apk add --update curl + if [[ "$CI_COMMIT_BRANCH" == "master" ]]; then + apk add --update curl jq rm -rf /var/cache/apk/* - curl "$NOVA_ADMIN_API_URL" -H "Content-Type: application/json" -d '{"password":"'"$NOVA_ADMIN_NIGHTLY_PASS"'","bridge":"'$NOVA_BRIDGE_TYPE'","image":"'$CI_REGISTRY_IMAGE':'$CI_COMMIT_SHA'-amd64"}' + + jq -n ' + { + password: env.BEEPER_DEV_ADMIN_NIGHTLY_PASS, + bridge: env.BEEPER_BRIDGE_TYPE, + image: "\(env.CI_REGISTRY_IMAGE):\(env.CI_COMMIT_SHA)-amd64", + channel: "STABLE" + } + ' | curl "$BEEPER_DEV_ADMIN_API_URL" -H "Content-Type: application/json" -d @- + + jq -n ' + { + password: env.BEEPER_PROD_ADMIN_NIGHTLY_PASS, + bridge: env.BEEPER_BRIDGE_TYPE, + image: "\(env.CI_REGISTRY_IMAGE):\(env.CI_COMMIT_SHA)-amd64", + channel: "INTERNAL", + deployNext: true + } + ' | curl "$BEEPER_PROD_ADMIN_API_URL" -H "Content-Type: application/json" -d @- fi build docker arm64: