Skip to content

Commit

Permalink
Clean up for the new domain name change. (#135)
Browse files Browse the repository at this point in the history
  • Loading branch information
pwei1018 authored Apr 19, 2023
1 parent c5ef4a2 commit 8603df4
Show file tree
Hide file tree
Showing 9 changed files with 71 additions and 175 deletions.
12 changes: 6 additions & 6 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@ SOCIETIES_URL="https://dev.bcregistry.ca/societies/"
WILLS_URL="https://ewills-dev.vs.gov.bc.ca/"
WILLS_LEARN_MORE_URL="https://www2.gov.bc.ca/gov/content/life-events/death/wills-registry"

AUTH_URL="https://dev.bcregistry.ca/business/auth/"
BUSINESS_URL="https://dev.bcregistry.ca/business/auth/"
BCROS_BASE_URL="https://dev.bcros.ca/"
BUSINESS_SEARCH_URL="https://dev.bcregistry.ca/business/search"
AUTH_URL="https://dev.account.bcregistry.gov.bc.ca/"
BUSINESS_URL="https://dev.account.bcregistry.gov.bc.ca/"
BCROS_BASE_URL="https://dev.bcregistry.gov.bc.ca/"
BUSINESS_SEARCH_URL="https://dev.search.business.bcregistry.gov.bc.ca"
BCOL_URL="https://d1.bconline.gov.bc.ca/"
BCEID_URL="https://www.test.bceid.ca/os/?7686&SkipTo=Basic"
NAME_REQUEST_URL="https://dev.bcregistry.ca/namerequest/"
NAME_REQUEST_URL="https://dev.names.bcregistry.gov.bc.ca/"
ORGBOOK_URL="https://orgbook.gov.bc.ca/"
PPR_URL="https://ppr-ui-dev.apps.silver.devops.gov.bc.ca/ppr/"
PPR_URL="https://dev.assets.bcregistry.gov.bc.ca/"
SITEMINDER_LOGOUT_URL="https://logontest7.gov.bc.ca/clp-cgi/logoff.cgi"

#vaults API
Expand Down
78 changes: 0 additions & 78 deletions cloudbuild-pr.yaml

This file was deleted.

30 changes: 0 additions & 30 deletions devops/cloudbuild-cd.yaml

This file was deleted.

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

# setup .env
- name: 'bash'
script: |
#!/usr/bin/env bash
cp .env.example .env
#
# Generate the statis site
#
- name: node:16.14.2
entrypoint: npm
env:
- 'BCREGISTRY_LD_CLIENT_ID=$_BCREGISTRY_LD_CLIENT_ID'
args: ['--openssl-legacy-provider', 'run', 'generate']

#
# Deploy to firebase channel, using the PR #
# store log to /workspace to get the channel URL
#
- name: gcr.io/yfthig-dev/firebase
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
entrypoint: bash
args:
- -c
- |
# Read from "/workspace"
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/bcregistry/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
28 changes: 0 additions & 28 deletions firebase-prod.json

This file was deleted.

28 changes: 0 additions & 28 deletions firebase-test.json

This file was deleted.

10 changes: 8 additions & 2 deletions firebase-dev.json → firebase.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@
"site": "yfthig-dev",
"public": "dist",
"ignore": ["**/devops/**", "**/.*", "**/node_modules/**"],
"rewrites": [
{
"source": "**",
"destination": "/index.html"
}
],
"headers" : [
{
"source": "**",
Expand All @@ -14,7 +20,7 @@
{ "key" : "X-XSS-Protection", "value" : "1; mode=block" },
{
"key": "Content-Security-Policy",
"value": "default-src 'self'; frame-src 'self' *.gov.bc.ca *.hotjar.com *.googleapis.com https://*.nr-data.net https://*.newrelic.com https://*.cac1.pure.cloud; script-src 'self' 'unsafe-eval' 'unsafe-inline' *.gov.bc.ca *.hotjar.com *.googleapis.com https://*.nr-data.net https://*.newrelic.com https://*.cac1.pure.cloud; style-src 'self' 'unsafe-inline' *.cloudflare.com *.googleapis.com; font-src 'self' *.gov.bc.ca *.hotjar.com *.cloudflare.com *.googleapis.com *.gstatic.com *.jsdelivr.net; img-src 'self' data: *.hotjar.com https://*.cac1.pure.cloud; connect-src 'self' *.gov.bc.ca *.launchdarkly.com *.hotjar.com *.postescanada-canadapost.ca *.sentry.io wss://*.hotjar.com *.hotjar.io https://*.nr-data.net https://shyrka-prod-cac1.s3.ca-central-1.amazonaws.com https://*.newrelic.com https://*.cac1.pure.cloud wss://*.cac1.pure.cloud; manifest-src 'self'; media-src 'self' https://*.cac1.pure.cloud; object-src 'self' https://*.cac1.pure.cloud; child-src 'self' https://*.cac1.pure.cloud;"
"value": "default-src 'self'; frame-src 'self' *.gov.bc.ca *.hotjar.com *.googleapis.com https://*.nr-data.net https://*.newrelic.com https://*.cac1.pure.cloud; script-src 'self' 'unsafe-eval' 'unsafe-inline' *.gov.bc.ca *.hotjar.com *.googleapis.com https://*.nr-data.net https://*.newrelic.com https://*.cac1.pure.cloud; style-src 'self' 'unsafe-inline' *.cloudflare.com *.googleapis.com *.jsdelivr.net; font-src 'self' *.gov.bc.ca *.hotjar.com *.cloudflare.com *.googleapis.com *.gstatic.com *.jsdelivr.net; img-src 'self' data: *.hotjar.com https://*.cac1.pure.cloud; connect-src 'self' *.gov.bc.ca *.launchdarkly.com *.hotjar.com *.postescanada-canadapost.ca *.sentry.io *.apigee.net wss://*.hotjar.com *.hotjar.io https://*.nr-data.net https://shyrka-prod-cac1.s3.ca-central-1.amazonaws.com https://*.newrelic.com https://*.cac1.pure.cloud wss://*.cac1.pure.cloud; manifest-src 'self'; media-src 'self' https://*.cac1.pure.cloud; object-src 'self' https://*.cac1.pure.cloud; child-src 'self' https://*.cac1.pure.cloud;"
},
{ "key": "Cache-Control", "value": "no-cache, no-store, must-revalidate"},
{ "key": "Pragma", "value": "no-cache"},
Expand All @@ -25,4 +31,4 @@
}
]
}
}
}
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "bc-registry",
"version": "2.0.4",
"version": "2.1.0",
"private": true,
"scripts": {
"dev": "nuxt",
Expand Down

0 comments on commit 8603df4

Please sign in to comment.