From 946ac6194a1eea5ba5b546130ea0d1bea22ef9e9 Mon Sep 17 00:00:00 2001 From: Maciej Kucharz Date: Wed, 31 Jan 2018 10:12:08 +0100 Subject: [PATCH] Deploy canary registry for master branch (#116) --- .circleci/config.yml | 18 ++++++++++++++++++ packages/registry/bin/deploy-canary | 7 +++++++ 2 files changed, 25 insertions(+) create mode 100644 packages/registry/bin/deploy-canary diff --git a/.circleci/config.yml b/.circleci/config.yml index d2a7ee90..802ba17a 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -348,6 +348,18 @@ jobs: key: v5-repo-{{ .Environment.CIRCLE_SHA1 }} - run: SYNCANO_AUTH_KEY=${REGISTRY_TEST_SYNCANO_AUTH_KEY} ../cli/lib/cli.js instance delete ${REGISTRY_TEST_SYNCANO_PROJECT_INSTANCE}-${CIRCLE_SHA1} + deploy_canary_registry: + name: Deploy Test Registry + docker: + - image: circleci/node:latest + + working_directory: ~/repo/packages/registry + + steps: + - restore_cache: + key: v5-repo-{{ .Environment.CIRCLE_SHA1 }} + - run: sh ./bin/deploy-canary + publish: name: Publish packages to NPM docker: @@ -463,3 +475,9 @@ workflows: filters: branches: only: /\d/ + - deploy_canary_registry: + requires: + - publish + filters: + branches: + only: master diff --git a/packages/registry/bin/deploy-canary b/packages/registry/bin/deploy-canary new file mode 100644 index 00000000..631c05fa --- /dev/null +++ b/packages/registry/bin/deploy-canary @@ -0,0 +1,7 @@ +#!/usr/bin/env sh + +export SYNCANO_AUTH_KEY=$REGISTRY_TEST_SYNCANO_AUTH_KEY +export SYNCANO_PROJECT_INSTANCE=registry-0 +npx s deploy + +exit $?