diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index ace89e81f..8bce859ed 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -9,27 +9,24 @@ on: workflow_dispatch: inputs: environment: - description: "Environment" + description: 'Environment' required: true type: choice options: - - dev - - test - - sandbox - - prod - tagname: - description: "Specify a previous version (git tag) to deploy" - required: false - default: "" + - dev + - test + - sandbox + - prod jobs: namerequest-ui-cd: - uses: bcgov/bcregistry-sre/.github/workflows/ui-cd-node20.yaml@main + uses: bcgov/bcregistry-sre/.github/workflows/frontend-cd.yaml@main with: - environment: ${{ inputs.environment }} - tagname: ${{ inputs.tagname }} + target: ${{ inputs.environment }} + node_version: '20.5.1' + app_name: 'namerequest' working_directory: 'app' secrets: - APP_NAME: "namerequest" - OP_CONNECT_URL: ${{ secrets.OP_CONNECT_URL }} - OP_CONNECT_TOKEN: ${{ secrets.OP_CONNECT_TOKEN }} + WORKLOAD_IDENTIFY_POOLS_PROVIDER: ${{ secrets.WORKLOAD_IDENTIFY_POOLS_PROVIDER }} + GCP_SERVICE_ACCOUNT: ${{ secrets.GCP_SERVICE_ACCOUNT }} + diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index c3b2f25d7..4f5ade82d 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -39,7 +39,7 @@ jobs: - name: E2E Smoke tests uses: cypress-io/github-action@v6 id: smoke - continue-on-error: false + continue-on-error: true with: summary-title: 'E2E Smoke tests' wait-on: ${{ secrets.CYPRESS_HOST }} @@ -64,3 +64,9 @@ jobs: with: name: smoke-test-results path: testing/mochawesome-report/report.html + + - name: Upload Test Videos + uses: actions/upload-artifact@v4 + with: + name: cypress-videos + path: testing/cypress/videos diff --git a/.gitignore b/.gitignore index 52e0dc57f..12ea8ca5c 100644 --- a/.gitignore +++ b/.gitignore @@ -11,6 +11,7 @@ public/config/configuration.json .firebase *.firebaserc *.log +!vaults.env # Cypress related files **/cypress.env.json diff --git a/devops/vaults.env b/app/devops/vaults.env similarity index 100% rename from devops/vaults.env rename to app/devops/vaults.env diff --git a/app/package.json b/app/package.json index 34ff8b5c7..b4742d60e 100644 --- a/app/package.json +++ b/app/package.json @@ -1,6 +1,6 @@ { "name": "name-request", - "version": "5.5.4", + "version": "5.5.5", "private": true, "appName": "Name Request UI", "sbcName": "SBC Common Components", diff --git a/devops/cloudbuild-pr.yaml b/devops/cloudbuild-pr.yaml deleted file mode 100644 index e537ddef3..000000000 --- a/devops/cloudbuild-pr.yaml +++ /dev/null @@ -1,64 +0,0 @@ -steps: - - name: 'node:20.5.1' - env: - - NUXT_ADDRESS_COMPLETE_KEY=$_NUXT_ADDRESS_COMPLETE_KEY - - AUTH_API_KEY=$_AUTH_API_KEY - - AUTH_DOMAIN=$_AUTH_DOMAIN - - AUTH_PROJECT_ID=$_AUTH_PROJECT_ID - - AUTH_MESSAGING_SENDER_ID=$_AUTH_MESSAGING_SENDER_ID - - AUTH_APP_ID=$_AUTH_APP_ID - - NUXT_KEYCLOAK_AUTH_URL=$_NUXT_KEYCLOAK_AUTH_URL - - NUXT_KEYCLOAK_REALM=$_NUXT_KEYCLOAK_REALM - - NUXT_KEYCLOAK_CLIENTID=$_NUXT_KEYCLOAK_CLIENTID - dir: app - script: | - #!/usr/bin/env bash - cp .env.example .env - npm install --global pnpm - pnpm install - pnpm build - - name: gcr.io/yfthig-dev/firebase - args: - - '-c' - - >- - firebase hosting:channel:deploy --project=yfthig-dev PR-$_PR_NUMBER > - /workspace/firebase-deploy.txt - dir: app - entrypoint: bash - - name: gcr.io/cloud-builders/curl - 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/namerequest/issues/$_PR_NUMBER/comments - \ - - --header "Authorization: Token $$TOKEN" \ - - --header "Accept: application/vnd.github.v3+json" \ - - --data-binary '{"body": "Temporary Url for review: '"$url"'"}' - dir: app - id: Update the PR - entrypoint: bash - secretEnv: - - TOKEN -options: - dynamicSubstitutions: true -availableSecrets: - secretManager: - - versionName: projects/$PROJECT_ID/secrets/token-pr-review/versions/latest - env: TOKEN - \ No newline at end of file