From 92ce87413eab1d16536e803a28e1b969c7021f9f Mon Sep 17 00:00:00 2001 From: Warren Searle Date: Fri, 27 Nov 2020 11:56:04 +0000 Subject: [PATCH 1/4] #1093 Include auth token env variable --- .npmrc | 1 + 1 file changed, 1 insertion(+) diff --git a/.npmrc b/.npmrc index 5477abf66..e7bc360e8 100644 --- a/.npmrc +++ b/.npmrc @@ -1 +1,2 @@ registry=https://npm.pkg.github.com/jac-uk +//npm.pkg.github.com/:_authToken=$GITHUB_PACKAGES_TOKEN From c29da95b6a3972624a17c185525cfb93861d926d Mon Sep 17 00:00:00 2001 From: Warren Searle Date: Fri, 27 Nov 2020 11:57:42 +0000 Subject: [PATCH 2/4] #1093 Include corresponding env variable --- .env.develop | 1 + 1 file changed, 1 insertion(+) diff --git a/.env.develop b/.env.develop index cfe0da9e0..5a5f1b8be 100644 --- a/.env.develop +++ b/.env.develop @@ -7,3 +7,4 @@ VUE_APP_FIREBASE_PROJECT_ID=$DEVELOP_FIREBASE_PROJECT_ID VUE_APP_FIREBASE_STORAGE_BUCKET=$DEVELOP_FIREBASE_STORAGE_BUCKET VUE_APP_FIREBASE_MESSAGING_SENDER_ID=$DEVELOP_FIREBASE_MESSAGING_SENDER_ID VUE_APP_FIREBASE_APP_ID=$DEVELOP_FIREBASE_APP_ID +NPM_CONFIG_GITHUB_PACKAGES_TOKEN=$DEVELOP_GITHUB_PACKAGES_TOKEN From 8305d5d80822f01cfff3c8cc895674aff1feba77 Mon Sep 17 00:00:00 2001 From: Warren Searle Date: Fri, 27 Nov 2020 12:15:04 +0000 Subject: [PATCH 3/4] #1093 Update config setup command instead --- .circleci/config.yml | 9 ++++++--- .npmrc | 1 - 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 324b2bdbc..feb057512 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -18,7 +18,10 @@ jobs: - checkout - run: name: 'Setup' - command: npm ci + command: | + npm config set registry https://npm.pkg.github.com/jac-uk + echo "//npm.pkg.github.com/:_authToken=${DEVELOP_GITHUB_PACKAGES_TOKEN}" > ~/.npmrc + npm ci - persist_to_workspace: root: . paths: @@ -54,7 +57,7 @@ jobs: name: 'Deploy to production' command: | npm run build-production - node_modules/.bin/firebase target:apply hosting production-admin-app jac-apply-admin-production --project production + node_modules/.bin/firebase target:apply hosting production-admin-app jac-apply-admin-production --project production node_modules/.bin/firebase deploy --force --token=$FIREBASE_DEPLOY_TOKEN --only hosting:production-admin-app --project production build-and-deploy-staging: @@ -117,6 +120,6 @@ workflows: - test filters: branches: - only: + only: - master - /hotfix/.*/ diff --git a/.npmrc b/.npmrc index e7bc360e8..5477abf66 100644 --- a/.npmrc +++ b/.npmrc @@ -1,2 +1 @@ registry=https://npm.pkg.github.com/jac-uk -//npm.pkg.github.com/:_authToken=$GITHUB_PACKAGES_TOKEN From 8a2c9e19f24a76b5bd6cccb3e793fd4f02cc0ae8 Mon Sep 17 00:00:00 2001 From: Warren Searle Date: Fri, 27 Nov 2020 12:20:44 +0000 Subject: [PATCH 4/4] #1093 Tidy up solution --- .circleci/config.yml | 3 +-- .env.develop | 1 - 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index feb057512..76e9f1d24 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -19,8 +19,7 @@ jobs: - run: name: 'Setup' command: | - npm config set registry https://npm.pkg.github.com/jac-uk - echo "//npm.pkg.github.com/:_authToken=${DEVELOP_GITHUB_PACKAGES_TOKEN}" > ~/.npmrc + echo "//npm.pkg.github.com/:_authToken=${GITHUB_PACKAGES_TOKEN}" > ~/.npmrc npm ci - persist_to_workspace: root: . diff --git a/.env.develop b/.env.develop index 5a5f1b8be..cfe0da9e0 100644 --- a/.env.develop +++ b/.env.develop @@ -7,4 +7,3 @@ VUE_APP_FIREBASE_PROJECT_ID=$DEVELOP_FIREBASE_PROJECT_ID VUE_APP_FIREBASE_STORAGE_BUCKET=$DEVELOP_FIREBASE_STORAGE_BUCKET VUE_APP_FIREBASE_MESSAGING_SENDER_ID=$DEVELOP_FIREBASE_MESSAGING_SENDER_ID VUE_APP_FIREBASE_APP_ID=$DEVELOP_FIREBASE_APP_ID -NPM_CONFIG_GITHUB_PACKAGES_TOKEN=$DEVELOP_GITHUB_PACKAGES_TOKEN