diff --git a/.env.example b/.env.example index f5db43e..564b583 100644 --- a/.env.example +++ b/.env.example @@ -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 diff --git a/cloudbuild-pr.yaml b/cloudbuild-pr.yaml deleted file mode 100644 index c5b5ebb..0000000 --- a/cloudbuild-pr.yaml +++ /dev/null @@ -1,78 +0,0 @@ -steps: - # install / setup ci - - name: node:16.14.2 - entrypoint: npm - args: ['install'] - # - # Generate the statis site - # - - name: node:16.14.2 - entrypoint: npm - env: - - 'ADDRESSCHANGE_URL=$_ADDRESSCHANGE_URL' - - 'AUTH_API_URL=$_AUTH_API_URL' - - 'AUTH_API_VERSION=$_AUTH_API_VERSION' - - 'AUTH_URL=$_AUTH_URL' - - 'BCA_LEARN_MORE_URL=$_BCA_LEARN_MORE_URL' - - 'BCA_URL=$_BCA_URL' - - 'BCEID_URL=$_BCEID_URL' - - 'BCOL_URL=$_BCOL_URL' - - 'BCREGISTRY_LD_CLIENT_ID=$_BCREGISTRY_LD_CLIENT_ID' - - 'BCROS_BASE_URL=$_BCROS_BASE_URL' - - 'BUS_SEARCH_LEARN_MORE=$_BUS_SEARCH_LEARN_MORE' - - 'BUSINESS_SEARCH_URL=$_BUSINESS_SEARCH_URL' - - 'BUSINESS_URL=$_BUSINESS_URL' - - 'COLIN_URL=$_COLIN_URL' - - 'CSO_LEARN_MORE_URL=$_CSO_LEARN_MORE_URL' - - 'CSO_URL=$_CSO_URL' - - 'ESRA_LEARN_MORE_URL=$_ESRA_LEARN_MORE_URL' - - 'ESRA_URL=$_ESRA_URL' - - 'MHR_LEARN_MORE=$_MHR_LEARN_MORE' - - 'NAME_REQUEST_URL=$_NAME_REQUEST_URL' - - 'ORGBOOK_URL=$_ORGBOOK_URL' - - 'PPR_URL=$_PPR_URL' - - 'REGISTRY_ACCOUNT_CREATE_URL=$_REGISTRY_ACCOUNT_CREATE_URL' - - 'RPT_URL=$_RPT_URL' - - 'RPT_LEARN_MORE_URL=$_RPT_LEARN_MORE_URL' - - 'SITEMINDER_LOGOUT_URL=$_SITEMINDER_LOGOUT_URL' - - 'SOCIETIES_URL=$_SOCIETIES_URL' - - 'STATUS_API_URL=$_STATUS_API_URL' - - 'STATUS_API_VERSION=$_STATUS_API_VERSION' - - 'WILLS_LEARN_MORE_URL=$_WILLS_LEARN_MORE_URL' - - 'WILLS_URL=$_WILLS_URL' - - 'KEYCLOAK_AUTH_URL=$_KEYCLOAK_AUTH_URL' - - 'KEYCLOAK_REALM=$_KEYCLOAK_REALM' - - 'KEYCLOAK_CLIENTID=$_KEYCLOAK_CLIENTID' - 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'| cut -c 77-| cut -d ' ' -f 1` - 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/github-appkey/versions/latest - env: 'TOKEN' -options: - dynamic_substitutions: true diff --git a/devops/cloudbuild-cd.yaml b/devops/cloudbuild-cd.yaml deleted file mode 100644 index 7f75c0d..0000000 --- a/devops/cloudbuild-cd.yaml +++ /dev/null @@ -1,30 +0,0 @@ -steps: - # install / setup ci - - name: node:$_DEPLOYMENT_NODE_VERSION - entrypoint: npm - args: ['install'] - - # - # Generate the static site - # - - name: node:$_DEPLOYMENT_NODE_VERSION - entrypoint: npm - 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/$_DEPLOYMENT_PROJECT/firebase - entrypoint: bash - args: ['-c', 'firebase deploy --project=$_DEPLOYMENT_PROJECT --config=firebase-$_DEPLOYMENT_ENVIRONMENT.json --only hosting:$_DEPLOYMENT_HOST_NAME'] - -substitutions: - _DEPLOYMENT_ENVIRONMENT: '${_DEPLOYMENT_ENVIRONMENT}' - _DEPLOYMENT_PROJECT: '${_DEPLOYMENT_PROJECT}' - _DEPLOYMENT_NODE_VERSION: '${_DEPLOYMENT_NODE_VERSION}' - _DEPLOYMENT_HOST_NAME: '${_DEPLOYMENT_HOST_NAME}' - - -options: - logging: CLOUD_LOGGING_ONLY \ No newline at end of file diff --git a/devops/cloudbuild-pr.yaml b/devops/cloudbuild-pr.yaml new file mode 100644 index 0000000..6b82820 --- /dev/null +++ b/devops/cloudbuild-pr.yaml @@ -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 diff --git a/firebase-prod.json b/firebase-prod.json deleted file mode 100644 index 6af2e21..0000000 --- a/firebase-prod.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "hosting": - { - "site": "yfthig-prod", - "public": "dist", - "ignore": ["firebase.json", "**/.*", "**/node_modules/**"], - "headers" : [ - { - "source": "**", - "headers" : [ - { "key" : "Access-Control-Allow-Origin", "value" : "*" }, - { "key" : "X-Frame-Options", "value" : "DENY" }, - { "key" : "X-Content-Type-Options", "value" : "nosniff" }, - { "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;" - }, - { "key": "Cache-Control", "value": "no-cache, no-store, must-revalidate"}, - { "key": "Pragma", "value": "no-cache"}, - { "key": "Referrer-Policy", "value": "no-referrer" }, - { "key": "Feature-Policy", "value": "microphone 'self'" }, - { "key": "Strict-Transport-Security", "value": "max-age=31536000;" } - ] - } - ] - } -} diff --git a/firebase-test.json b/firebase-test.json deleted file mode 100644 index e3ccc44..0000000 --- a/firebase-test.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "hosting": - { - "site": "bcr-home-site-test", - "public": "dist", - "ignore": ["firebase.json", "**/.*", "**/node_modules/**"], - "headers" : [ - { - "source": "**", - "headers" : [ - { "key" : "Access-Control-Allow-Origin", "value" : "*" }, - { "key" : "X-Frame-Options", "value" : "DENY" }, - { "key" : "X-Content-Type-Options", "value" : "nosniff" }, - { "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;" - }, - { "key": "Cache-Control", "value": "no-cache, no-store, must-revalidate"}, - { "key": "Pragma", "value": "no-cache"}, - { "key": "Referrer-Policy", "value": "no-referrer" }, - { "key": "Feature-Policy", "value": "microphone 'self'" }, - { "key": "Strict-Transport-Security", "value": "max-age=31536000;" } - ] - } - ] - } -} diff --git a/firebase-dev.json b/firebase.json similarity index 63% rename from firebase-dev.json rename to firebase.json index 9523f49..a08a2b2 100644 --- a/firebase-dev.json +++ b/firebase.json @@ -4,6 +4,12 @@ "site": "yfthig-dev", "public": "dist", "ignore": ["**/devops/**", "**/.*", "**/node_modules/**"], + "rewrites": [ + { + "source": "**", + "destination": "/index.html" + } + ], "headers" : [ { "source": "**", @@ -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"}, @@ -25,4 +31,4 @@ } ] } -} +} \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index e7df470..8cc27db 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "bc-registry", - "version": "2.0.4", + "version": "2.1.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "bc-registry", - "version": "2.0.4", + "version": "2.1.0", "dependencies": { "@mdi/font": "6.5.95", "@nuxt/content": "^1.14.0", diff --git a/package.json b/package.json index 4e3bfe2..115d95b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "bc-registry", - "version": "2.0.4", + "version": "2.1.0", "private": true, "scripts": { "dev": "nuxt",