From f45d503f8bf569e892d0d685b4a068b4d5c5481c Mon Sep 17 00:00:00 2001 From: Luan Date: Thu, 18 Mar 2021 15:23:57 -0400 Subject: [PATCH 1/6] fix: updating env on scripts --- .github/workflows/publish-to-gke.anvil.yml | 7 +++---- .github/workflows/publish-to-gke.tcga.yml | 10 ++++++---- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/.github/workflows/publish-to-gke.anvil.yml b/.github/workflows/publish-to-gke.anvil.yml index d83388f..c515109 100644 --- a/.github/workflows/publish-to-gke.anvil.yml +++ b/.github/workflows/publish-to-gke.anvil.yml @@ -1,8 +1,7 @@ name: ANVIL - Build and Publish to GKE on: - release: - types: [published] + push: env: GITHUB_SHA: ${{ github.sha }} @@ -80,8 +79,8 @@ jobs: - name: Install Node Modules run: npm install - - name: Generate .env - run: node ../scripts/create-env-file.js TCGA_URL=${{ secrets.TCGA_URL }} ANVIL_URL=${{ secrets.ANVIL_URL }} URL=${{ secrets.URL }} + - name: Generate env + run: node ../scripts/create-env-file.js PORT=3002 MONGO_CONNECTION_STRING=${{ secrets.MONGO_READ_CONNECTION_STRING }} PROJECT_ID=${{ secrets.PROJECT_ID }} - name: Build run: | diff --git a/.github/workflows/publish-to-gke.tcga.yml b/.github/workflows/publish-to-gke.tcga.yml index 7551542..e6816e0 100644 --- a/.github/workflows/publish-to-gke.tcga.yml +++ b/.github/workflows/publish-to-gke.tcga.yml @@ -1,8 +1,7 @@ name: TCGA - Build and Publish to GKE on: - release: - types: [published] + push: env: GITHUB_SHA: ${{ github.sha }} @@ -80,8 +79,11 @@ jobs: - name: Install Node Modules run: npm install - - name: Generate .env - run: node ../scripts/create-env-file.js TCGA_URL=${{ secrets.TCGA_URL }} ANVIL_URL=${{ secrets.ANVIL_URL }} URL=${{ secrets.URL }} + - name: Generate GCP Credentials + run: node ../scripts/create-gcp-cred-file.js + + - name: Generate env + run: node ../scripts/create-env-file.js PORT=3001 GOOGLE_APPLICATION_CREDENTIALS=./creds.json PROJECT_ID=${{ secrets.PROJECT_ID }} - name: Build run: | From 939fc221bdd2bb57d0ad296f09196ef32038d08d Mon Sep 17 00:00:00 2001 From: Luan Date: Thu, 18 Mar 2021 15:26:52 -0400 Subject: [PATCH 2/6] fix: indentation --- .github/workflows/publish-to-gke.anvil.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/publish-to-gke.anvil.yml b/.github/workflows/publish-to-gke.anvil.yml index c515109..392019c 100644 --- a/.github/workflows/publish-to-gke.anvil.yml +++ b/.github/workflows/publish-to-gke.anvil.yml @@ -79,7 +79,7 @@ jobs: - name: Install Node Modules run: npm install - - name: Generate env + - name: Generate env run: node ../scripts/create-env-file.js PORT=3002 MONGO_CONNECTION_STRING=${{ secrets.MONGO_READ_CONNECTION_STRING }} PROJECT_ID=${{ secrets.PROJECT_ID }} - name: Build From 6b6f7da12c8b6638150b14b7a68ad5305da1cea1 Mon Sep 17 00:00:00 2001 From: Luan Date: Thu, 18 Mar 2021 15:29:26 -0400 Subject: [PATCH 3/6] fix: added more env vars --- .github/workflows/publish-to-gke.tcga.yml | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/.github/workflows/publish-to-gke.tcga.yml b/.github/workflows/publish-to-gke.tcga.yml index e6816e0..dee5e62 100644 --- a/.github/workflows/publish-to-gke.tcga.yml +++ b/.github/workflows/publish-to-gke.tcga.yml @@ -12,9 +12,15 @@ env: REGISTRY_HOSTNAME: gcr.io GKE_CLUSTER: broad-fhir-cluster GKE_ZONE: us-east1-b - URL: ${{ secrets.URL }} - TCGA_URL: ${{ secrets.TCGA_URL }} - ANVIL_URL: ${{ secrets.ANVIL_URL }} + TYPE: ${{ secrets.TYPE }} + PRIVATE_KEY_ID: ${{ secrets.PRIVATE_KEY_ID }} + PRIVATE_KEY: ${{ secrets.PRIVATE_KEY }} + CLIENT_EMAIL: ${{ secrets.CLIENT_EMAIL }} + CLIENT_ID: ${{ secrets.CLIENT_ID }} + AUTH_URI: ${{ secrets.AUTH_URI }} + TOKEN_URI: ${{ secrets.TOKEN_URI }} + AUTH_PROVIDER_X509_CERT_URL: ${{ secrets.AUTH_PROVIDER_X509_CERT_URL }} + CLIENT_X509_CERT_URL: ${{ secrets.CLIENT_X509_CERT_URL }} jobs: run-tests: From d42196e1fbea1bb5cb774ece2d702330ad0361d8 Mon Sep 17 00:00:00 2001 From: Luan Date: Thu, 18 Mar 2021 15:37:04 -0400 Subject: [PATCH 4/6] fix: anvil script --- .github/workflows/publish-to-gke.anvil.yml | 15 ++++++++++++--- .github/workflows/publish-to-gke.tcga.yml | 3 ++- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/.github/workflows/publish-to-gke.anvil.yml b/.github/workflows/publish-to-gke.anvil.yml index 392019c..ac30c87 100644 --- a/.github/workflows/publish-to-gke.anvil.yml +++ b/.github/workflows/publish-to-gke.anvil.yml @@ -12,9 +12,15 @@ env: REGISTRY_HOSTNAME: gcr.io GKE_CLUSTER: broad-fhir-cluster GKE_ZONE: us-east1-b - URL: ${{ secrets.URL }} - TCGA_URL: ${{ secrets.TCGA_URL }} - ANVIL_URL: ${{ secrets.ANVIL_URL }} + TYPE: ${{ secrets.TYPE }} + PRIVATE_KEY_ID: ${{ secrets.PRIVATE_KEY_ID }} + PRIVATE_KEY: ${{ secrets.PRIVATE_KEY }} + CLIENT_EMAIL: ${{ secrets.CLIENT_EMAIL }} + CLIENT_ID: ${{ secrets.CLIENT_ID }} + AUTH_URI: ${{ secrets.AUTH_URI }} + TOKEN_URI: ${{ secrets.TOKEN_URI }} + AUTH_PROVIDER_X509_CERT_URL: ${{ secrets.AUTH_PROVIDER_X509_CERT_URL }} + CLIENT_X509_CERT_URL: ${{ secrets.CLIENT_X509_CERT_URL }} jobs: run-tests: @@ -79,6 +85,9 @@ jobs: - name: Install Node Modules run: npm install + - name: Generate GCP Credentials + run: node ../scripts/create-gcp-cred-file.js + - name: Generate env run: node ../scripts/create-env-file.js PORT=3002 MONGO_CONNECTION_STRING=${{ secrets.MONGO_READ_CONNECTION_STRING }} PROJECT_ID=${{ secrets.PROJECT_ID }} diff --git a/.github/workflows/publish-to-gke.tcga.yml b/.github/workflows/publish-to-gke.tcga.yml index dee5e62..40a83a0 100644 --- a/.github/workflows/publish-to-gke.tcga.yml +++ b/.github/workflows/publish-to-gke.tcga.yml @@ -1,7 +1,8 @@ name: TCGA - Build and Publish to GKE on: - push: + release: + types: [published] env: GITHUB_SHA: ${{ github.sha }} From dc577371fc44db523ac19c8be4ca5340b9d9e17c Mon Sep 17 00:00:00 2001 From: Luan Date: Thu, 18 Mar 2021 15:38:27 -0400 Subject: [PATCH 5/6] Revert "fix: anvil script" This reverts commit d42196e1fbea1bb5cb774ece2d702330ad0361d8. --- .github/workflows/publish-to-gke.anvil.yml | 15 +++------------ .github/workflows/publish-to-gke.tcga.yml | 3 +-- 2 files changed, 4 insertions(+), 14 deletions(-) diff --git a/.github/workflows/publish-to-gke.anvil.yml b/.github/workflows/publish-to-gke.anvil.yml index ac30c87..392019c 100644 --- a/.github/workflows/publish-to-gke.anvil.yml +++ b/.github/workflows/publish-to-gke.anvil.yml @@ -12,15 +12,9 @@ env: REGISTRY_HOSTNAME: gcr.io GKE_CLUSTER: broad-fhir-cluster GKE_ZONE: us-east1-b - TYPE: ${{ secrets.TYPE }} - PRIVATE_KEY_ID: ${{ secrets.PRIVATE_KEY_ID }} - PRIVATE_KEY: ${{ secrets.PRIVATE_KEY }} - CLIENT_EMAIL: ${{ secrets.CLIENT_EMAIL }} - CLIENT_ID: ${{ secrets.CLIENT_ID }} - AUTH_URI: ${{ secrets.AUTH_URI }} - TOKEN_URI: ${{ secrets.TOKEN_URI }} - AUTH_PROVIDER_X509_CERT_URL: ${{ secrets.AUTH_PROVIDER_X509_CERT_URL }} - CLIENT_X509_CERT_URL: ${{ secrets.CLIENT_X509_CERT_URL }} + URL: ${{ secrets.URL }} + TCGA_URL: ${{ secrets.TCGA_URL }} + ANVIL_URL: ${{ secrets.ANVIL_URL }} jobs: run-tests: @@ -85,9 +79,6 @@ jobs: - name: Install Node Modules run: npm install - - name: Generate GCP Credentials - run: node ../scripts/create-gcp-cred-file.js - - name: Generate env run: node ../scripts/create-env-file.js PORT=3002 MONGO_CONNECTION_STRING=${{ secrets.MONGO_READ_CONNECTION_STRING }} PROJECT_ID=${{ secrets.PROJECT_ID }} diff --git a/.github/workflows/publish-to-gke.tcga.yml b/.github/workflows/publish-to-gke.tcga.yml index 40a83a0..dee5e62 100644 --- a/.github/workflows/publish-to-gke.tcga.yml +++ b/.github/workflows/publish-to-gke.tcga.yml @@ -1,8 +1,7 @@ name: TCGA - Build and Publish to GKE on: - release: - types: [published] + push: env: GITHUB_SHA: ${{ github.sha }} From f77e344120fae98da6154ae7da9526083884a4a4 Mon Sep 17 00:00:00 2001 From: Luan Date: Thu, 18 Mar 2021 15:40:45 -0400 Subject: [PATCH 6/6] fix: fixed script run trigger --- .github/workflows/publish-to-gke.anvil.yml | 3 ++- .github/workflows/publish-to-gke.tcga.yml | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/publish-to-gke.anvil.yml b/.github/workflows/publish-to-gke.anvil.yml index 392019c..bb10fe4 100644 --- a/.github/workflows/publish-to-gke.anvil.yml +++ b/.github/workflows/publish-to-gke.anvil.yml @@ -1,7 +1,8 @@ name: ANVIL - Build and Publish to GKE on: - push: + release: + types: [published] env: GITHUB_SHA: ${{ github.sha }} diff --git a/.github/workflows/publish-to-gke.tcga.yml b/.github/workflows/publish-to-gke.tcga.yml index dee5e62..40a83a0 100644 --- a/.github/workflows/publish-to-gke.tcga.yml +++ b/.github/workflows/publish-to-gke.tcga.yml @@ -1,7 +1,8 @@ name: TCGA - Build and Publish to GKE on: - push: + release: + types: [published] env: GITHUB_SHA: ${{ github.sha }}