From 59963d55ddc20f0cc4db2e6aff7ec64acd91684e Mon Sep 17 00:00:00 2001 From: Giles Bradshaw Date: Thu, 27 Aug 2020 17:18:23 +0100 Subject: [PATCH] ci: promote to production to deploy --- .drone/drone-home.jsonnet | 13 ++++++++++++- .drone/drone-home.yml | 23 +++++++++++++++++++++++ .drone/yarn.lock | 22 +++++++++++++++++++++- .gitignore | 3 ++- 4 files changed, 58 insertions(+), 3 deletions(-) diff --git a/.drone/drone-home.jsonnet b/.drone/drone-home.jsonnet index 1b822f4..957a45f 100644 --- a/.drone/drone-home.jsonnet +++ b/.drone/drone-home.jsonnet @@ -3,7 +3,9 @@ local secretSecrets = import 'lib/secret-secrets.libsonnet'; local publicSecrets = import 'lib/public-secrets.libsonnet'; local deploy = import 'node_modules/@sigyl/jsonnet-drone/deploy.libsonnet'; +local register = import 'node_modules/@sigyl/jsonnet-drone/register.libsonnet'; [ + register, deploy( 'chat', '/stack/', @@ -13,5 +15,14 @@ local deploy = import 'node_modules/@sigyl/jsonnet-drone/deploy.libsonnet'; ], publicSecrets, secretSecrets - ), + ) { + trigger +: { + event +: [ + 'promote', + ], + target +: [ + 'production', + ], + }, + }, ] diff --git a/.drone/drone-home.yml b/.drone/drone-home.yml index 42443d6..4a42d39 100644 --- a/.drone/drone-home.yml +++ b/.drone/drone-home.yml @@ -1,3 +1,20 @@ +--- +kind: pipeline +type: docker +name: register + +platform: + os: linux + arch: amd64 + +clone: + disable: true + +trigger: + event: + exclude: + - promote + --- kind: pipeline type: docker @@ -157,4 +174,10 @@ volumes: host: path: /etc/docker/certs.d +trigger: + event: + - promote + target: + - production + ... diff --git a/.drone/yarn.lock b/.drone/yarn.lock index ec747fa..d1aa19a 100644 --- a/.drone/yarn.lock +++ b/.drone/yarn.lock @@ -1 +1,21 @@ -null \ No newline at end of file +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + + +"@sigyl/jsonnet-compose@^0.0.2": + version "0.0.2" + resolved "https://registry.yarnpkg.com/@sigyl/jsonnet-compose/-/jsonnet-compose-0.0.2.tgz#8900a21e8cd8109929b6042703f8645aacb9bcda" + integrity sha512-wWS3CgPeNi/o1pcS6n/4pafxlMD0KC9/RKMZr/ySmzeGNRW++sPuKuxajYse2TNd47uNDdeUSnk4aEeEIKL0zA== + +"@sigyl/jsonnet-drone-environment@0.0.5": + version "0.0.5" + resolved "https://registry.yarnpkg.com/@sigyl/jsonnet-drone-environment/-/jsonnet-drone-environment-0.0.5.tgz#9ea85e08904777bd21a3e4b30b0b91461d0285ff" + integrity sha512-xVGmdMO1pOyozAWUbJm6mzKBgsLPJ+1hWnGCK3AxPkr7kkDh18hu30+TLzlcQtqq76s5jUfvJUztezsGj/mIcw== + +"@sigyl/jsonnet-drone@^0.0.8": + version "0.0.8" + resolved "https://registry.yarnpkg.com/@sigyl/jsonnet-drone/-/jsonnet-drone-0.0.8.tgz#f928e6784bccf1abb82afed3cab6e435c62d2e93" + integrity sha512-BuFVawb7z3aUYqHCBqykgALjF07crnN2H7+WLo8crH3vT7FPMLbYdoTv7N98P8OhZBKv6KvBQep6uZK3Reho5g== + dependencies: + "@sigyl/jsonnet-compose" "^0.0.2" + "@sigyl/jsonnet-drone-environment" "0.0.5" diff --git a/.gitignore b/.gitignore index b512c09..ab05030 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ -node_modules \ No newline at end of file +node_modules +*.log \ No newline at end of file