-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ongoing unit test refactors and clean up
- Loading branch information
1 parent
42725e1
commit 173a901
Showing
13 changed files
with
845 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
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' | ||
- 'VUE_APP_PPR_API_KEY=$_VUE_APP_PPR_API_KEY' | ||
- 'VUE_APP_MHR_API_KEY=$_VUE_APP_MHR_API_KEY' | ||
- 'VUE_APP_LTSA_API_KEY=$_VUE_APP_LTSA_API_KEY' | ||
- 'VUE_APP_REGISTRIES_SEARCH_API_KEY=$_VUE_APP_REGISTRIES_SEARCH_API_KEY' | ||
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
# Base Path Openshift: /ppr Firebase: / | ||
VUE_APP_PATH="/" | ||
|
||
#vaults canadapost | ||
VUE_APP_ADDRESS_COMPLETE_KEY="op://canadapost/$APP_ENV/address-key/ADDRESS_COMPLETE_KEY" | ||
|
||
#vaults assets | ||
VUE_APP_POD_NAMESPACE="op://ppr/$APP_ENV/ppr-ui/POD_NAMESPACE" | ||
VUE_APP_PPR_STAFF_PARTY_CODE="op://ppr/$APP_ENV/ppr-ui/PPR_STAFF_PARTY_CODE" | ||
VUE_APP_BCOL_STAFF_PARTY_CODE="op://ppr/$APP_ENV/ppr-ui/BCOL_STAFF_PARTY_CODE" | ||
|
||
#vaults web-url | ||
VUE_APP_REGISTRY_URL="op://web-url/$APP_ENV/registry/REGISTRY_URL" | ||
VUE_APP_AUTH_WEB_URL="op://web-url/$APP_ENV/auth-web/AUTH_WEB_URL" | ||
VUE_APP_DOCUMENTS_UI_URL="op://web-url/$APP_ENV/documents-ui/DOCUMENTS_UI_URL" | ||
VUE_APP_SITEMINDER_LOGOUT_URL="op://web-url/$APP_ENV/siteminder/SITEMINDER_LOGOUT_URL" | ||
|
||
#vaults API | ||
VUE_APP_PPR_API_URL="op://API/$APP_ENV/ppr-api/PPR_API_URL" | ||
VUE_APP_PPR_API_VERSION="op://API/$APP_ENV/ppr-api/PPR_API_VERSION" | ||
VUE_APP_PPR_API_KEY="op://API/$APP_ENV/ppr-api/PPR_API_KEY" | ||
VUE_APP_MHR_API_URL="op://API/$APP_ENV/ppr-api/MHR_API_URL" | ||
VUE_APP_MHR_API_VERSION="op://API/$APP_ENV/ppr-api/MHR_API_VERSION" | ||
VUE_APP_MHR_API_KEY="op://API/$APP_ENV/ppr-api/MHR_API_KEY" | ||
VUE_APP_LTSA_API_URL="op://API/$APP_ENV/ltsa-api/LTSA_API_URL" | ||
VUE_APP_LTSA_API_VERSION="op://API/$APP_ENV/ltsa-api/LTSA_API_VERSION" | ||
VUE_APP_LTSA_API_KEY="op://API/$APP_ENV/ltsa-api/LTSA_API_KEY" | ||
VUE_APP_DOC_API_URL="op://API/$APP_ENV/doc-api/DOC_API_URL" | ||
VUE_APP_DOC_API_VERSION="op://API/$APP_ENV/doc-api/DOC_API_VERSION" | ||
VUE_APP_DOC_API_KEY="op://API/$APP_ENV/doc-api/DOC_API_KEY" | ||
VUE_APP_AUTH_API_URL="op://API/$APP_ENV/auth-api/AUTH_API_URL" | ||
VUE_APP_AUTH_API_VERSION="op://API/$APP_ENV/auth-api/AUTH_API_VERSION" | ||
VUE_APP_STATUS_API_URL="op://API/$APP_ENV/status-api/STATUS_API_URL" | ||
VUE_APP_STATUS_API_VERSION="op://API/$APP_ENV/status-api/STATUS_API_VERSION" | ||
VUE_APP_PAY_API_URL="op://API/$APP_ENV/pay-api/PAY_API_URL" | ||
VUE_APP_PAY_API_VERSION="op://API/$APP_ENV/pay-api/PAY_API_VERSION" | ||
VUE_APP_VON_API_URL="op://API/$APP_ENV/von-api/VON_API_URL" | ||
VUE_APP_VON_API_VERSION="op://API/$APP_ENV/von-api/VON_API_VERSION" | ||
VUE_APP_REGISTRIES_SEARCH_API_URL="op://API/$APP_ENV/registries-search-api/REGISTRIES_SEARCH_API_URL" | ||
VUE_APP_REGISTRIES_SEARCH_API_VERSION="op://API/$APP_ENV/registries-search-api/REGISTRIES_SEARCH_API_VERSION" | ||
VUE_APP_REGISTRIES_SEARCH_API_KEY="op://API/$APP_ENV/registries-search-api/REGISTRIES_SEARCH_API_KEY" | ||
|
||
|
||
#vaults launchdarkly | ||
VUE_APP_PPR_LD_CLIENT_ID="op://launchdarkly/$APP_ENV/ppr/PPR_LD_CLIENT_ID" | ||
|
||
#vaults keycloak | ||
VUE_APP_KEYCLOAK_AUTH_URL="op://keycloak/$APP_ENV/base/KEYCLOAK_AUTH_BASE_URL" | ||
VUE_APP_KEYCLOAK_REALM="op://keycloak/$APP_ENV/base/KEYCLOAK_REALMNAME" | ||
VUE_APP_KEYCLOAK_CLIENTID="op://keycloak/$APP_ENV/ppr-web/UI_KEYCLOAK_RESOURCE_NAME" | ||
|
||
#vaults sentry | ||
VUE_APP_SENTRY_DSN="op://sentry/$APP_ENV/ppr/SENTRY_DSN" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.