Skip to content

Commit

Permalink
BC-5468 Used hardcoded values in automatic trigger workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
UzaeirKhan committed Nov 24, 2023
1 parent 1038ec9 commit f9598a4
Showing 1 changed file with 5 additions and 32 deletions.
37 changes: 5 additions & 32 deletions .github/workflows/automatic-trigger.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,6 @@ on: [push]
jobs:
e2e-system-tests:
runs-on: ubuntu-latest
outputs:
cypress_brb: ${{ steps.set_variables.outputs.cypress_brb }}
cypress_dbc: ${{ steps.set_variables.outputs.cypress_dbc }}
cypress_nbc: ${{ steps.set_variables.outputs.cypress_nbc }}
tag: ${{ steps.set_variables.outputs.tag }}
environment: ${{ steps.set_variables.outputs.environment }}

steps:
- name: Setup Node
Expand All @@ -20,35 +14,14 @@ jobs:
- name: Checkout
uses: actions/checkout@v3

- name: Install 1Password CLI
uses: 1password/install-cli-action@v1

- name: Verify 1Password was Installed
run: op --version

- name: Configure 1Password Service Account
uses: 1password/load-secrets-action/configure@v1
with:
service-account-token: ${{ secrets.CYPRESS_ONEPWD_SERVICE_ACCOUNT_TOKEN }}

- name: Set all parameters for next job
id: set_variables
shell: bash
run: |
echo "cypress_brb=$(op document get cypress-json --vault cy-dev-brb | jq -r '.BRB')" >> $GITHUB_OUTPUT
echo "cypress_dbc=$(op document get cypress-json --vault cy-dev-dbc | jq -r '.DEFAULT')" >> $GITHUB_OUTPUT
echo "cypress_nbc=$(op document get cypress-json --vault cy-dev-nbc | jq -r '.NBC')" >> $GITHUB_OUTPUT
echo "tag=tag:stable:ci" >> $GITHUB_OUTPUT
echo "environment=dev" >> $GITHUB_OUTPUT
configuring-loading-secrets-running-tests:
needs: e2e-system-tests
uses: ./.github/workflows/main.yml
secrets:
service-account-token: ${{ secrets.CYPRESS_ONEPWD_SERVICE_ACCOUNT_TOKEN }}
with:
cypress_brb: ${{ needs.e2e-system-tests.outputs.cypress_brb }}
cypress_default: ${{ needs.e2e-system-tests.outputs.cypress_dbc }}
cypress_nbc: ${{ needs.e2e-system-tests.outputs.cypress_nbc }}
tag: ${{ needs.e2e-system-tests.outputs.tag }}
environment: ${{ needs.e2e-system-tests.outputs.environment }}
cypress_brb: https://brb-main.cd.dbildungscloud.dev
cypress_default: https://default-main.cd.dbildungscloud.dev
cypress_nbc: https://nbc-main.cd.dbildungscloud.dev
tag: tag:stable:ci
environment: dev

0 comments on commit f9598a4

Please sign in to comment.