-
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.
Clean up for the new domain name changes.
- Loading branch information
Showing
8 changed files
with
62 additions
and
431 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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,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 |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
File renamed without changes.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.