Skip to content

Commit

Permalink
Clean up for the new domain name changes.
Browse files Browse the repository at this point in the history
  • Loading branch information
pwei1018 committed Apr 19, 2023
1 parent 4a4942d commit 9255e77
Show file tree
Hide file tree
Showing 8 changed files with 62 additions and 431 deletions.
30 changes: 0 additions & 30 deletions ppr-ui/devops/cloudbuild-cd.yaml

This file was deleted.

61 changes: 61 additions & 0 deletions ppr-ui/devops/cloudbuild-pr.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
steps:
# install / setup ci
- name: node:16.14.2
entrypoint: npm
dir: "ppr-ui"
args: ['install']

# setup .env
- name: 'bash'
dir: "ppr-ui"
script: |
#!/usr/bin/env bash
cp .env.example .env
#
# Generate the static site
#
- name: node:16.14.2
dir: "ppr-ui"
entrypoint: npm
env:
- 'VUE_APP_ADDRESS_COMPLETE_KEY=$_VUE_APP_ADDRESS_COMPLETE_KEY'
- 'VUE_APP_PPR_LD_CLIENT_ID=$_VUE_APP_PPR_LD_CLIENT_ID'
args: ['--openssl-legacy-provider', 'run', 'build']

#
# Deploy to firebase channel, using the PR #
# store log to /workspace to get the channel URL
#
- name: gcr.io/yfthig-dev/firebase
dir: "ppr-ui"
entrypoint: bash
args: ['-c', 'firebase hosting:channel:deploy --project=yfthig-dev PR-$_PR_NUMBER > /workspace/firebase-deploy.txt']

#
# Update the PR with the temporary URL
#
- id: "Update the PR"
name: gcr.io/cloud-builders/curl
dir: "ppr-ui"
entrypoint: bash
args:
- -c
- |
# Read from "/workspace"
cat /workspace/firebase-deploy.txt
url=`cat /workspace/firebase-deploy.txt| grep 'Channel URL' | grep -Eo "https://[a-zA-Z0-9./?=_%:-]*"`
echo "this is the body:"
echo '{"body": "Temporary Url for review:'"$url"'"}'
curl -X POST \
https://api.github.com/repos/bcgov/ppr/issues/$_PR_NUMBER/comments \
--header "Authorization: Token $$TOKEN" \
--header "Accept: application/vnd.github.v3+json" \
--data-binary '{"body": "Temporary Url for review: '"$url"'"}'
secretEnv: ['TOKEN']
availableSecrets:
secretManager:
- versionName: projects/$PROJECT_ID/secrets/token-pr-review/versions/latest
env: 'TOKEN'
options:
dynamic_substitutions: true
34 changes: 0 additions & 34 deletions ppr-ui/firebase-prod.json

This file was deleted.

34 changes: 0 additions & 34 deletions ppr-ui/firebase-test.json

This file was deleted.

File renamed without changes.
112 changes: 0 additions & 112 deletions ppr-ui/k8s/templates/bc.yaml

This file was deleted.

Loading

0 comments on commit 9255e77

Please sign in to comment.