Skip to content

Commit

Permalink
BC-5468 update after review
Browse files Browse the repository at this point in the history
  • Loading branch information
UzaeirKhan committed Nov 13, 2023
1 parent 46ff185 commit 8dfaafe
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,20 +87,20 @@ jobs:
environment="dev"
fi
file_paths=()
for instance in "${instances[@]}"; do
if [[ $workflow_name == *"manual"* || $workflow_name == *"remote"* ]]; then
file_path="${{ github.workspace }}/e2e-system-tests/env_variables/file-${environment}-${instance}.json"
else
file_path="${{ github.workspace }}/e2e-system-tests/env_variables/file-dev-${instance}.json"
fi
while IFS="=" read -r key value; do
echo "Setting $key"
echo "::add-mask::$value"
echo "$key=$value" >> $GITHUB_ENV
done < <(jq -r 'to_entries | .[] | .key + "=" + .value' "$file_path")
file_paths+=("$file_path")
done
cat "${file_paths[@]}" > ${{ github.workspace }}/e2e-system-tests/env_variables/combined_credentials.env.json
- name: Clean up previous report
uses: cypress-io/github-action@v5
with:
Expand Down
7 changes: 6 additions & 1 deletion cypress.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,13 @@ const preprocessor = require('@badeball/cypress-cucumber-preprocessor')
async function setupNodeEvents (on, config) {
const isCI = config.env.environmentName === 'ci'
if (isCI) {
const environmentFilename = `./env_variables/combined_credentials.env.json`
console.log('loading %s', environmentFilename)
const settings = require(environmentFilename)

config.env = {
...config.env
...config.env,
...settings
}
} else {
const environmentName = config.env.environmentName || 'local'
Expand Down

0 comments on commit 8dfaafe

Please sign in to comment.