Skip to content

Commit

Permalink
[QT-516] Testing enos debug data upload
Browse files Browse the repository at this point in the history
  • Loading branch information
Mike Baum committed Mar 31, 2023
1 parent 6fd74b7 commit 65988ad
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions .github/workflows/test-run-enos-scenario-matrix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ jobs:
ENOS_VAR_vault_revision: ${{ inputs.vault-revision }}
ENOS_VAR_vault_bundle_path: ./support/downloads/${{ inputs.build-artifact-name }}
ENOS_VAR_vault_license_path: ./support/vault.hclic
ENOS_DEBUG_DATA_ROOT_DIR: ./support/debug-data
ENOS_DEBUG_DATA_ROOT_DIR: ./enos/support/debug-data
steps:
- uses: actions/checkout@v3
- uses: hashicorp/setup-terraform@v2
Expand All @@ -127,10 +127,12 @@ jobs:
with:
github-token: ${{ secrets.ELEVATED_GITHUB_TOKEN }}
- name: Prepare scenario dependencies
id: prepare_scenario
run: |
mkdir -p ./enos/support/terraform-plugin-cache
echo "${{ secrets.SSH_KEY_PRIVATE_CI }}" > ./enos/support/private_key.pem
chmod 600 ./enos/support/private_key.pem
echo "debug_data_artifact_name=enos-debug-data_$(echo ${{ matrix.scenario }} | sed -e 's/ /_/g' | sed -e 's/:/=/g')" >> $GITHUB_OUTPUT
- if: contains(inputs.matrix-file-name, 'github')
uses: actions/download-artifact@v3
with:
Expand All @@ -150,12 +152,12 @@ jobs:
if: steps.run.outcome == 'failure'
run: enos scenario run --timeout 60m0s --chdir ./enos ${{ matrix.scenario }}
- name: Upload Debug Data
if: steps.run_retry.outcome == 'failure'
if: failure()
uses: actions/upload-artifact@v3
with:
# The name of the artifact is the same as the matrix scenario name with the spaces replaced with underscores.
name: ${${{ matrix.scenario }}// /_}.zip
path: $ENOS_DEBUG_DATA_ROOT_DIR
# The name of the artifact is the same as the matrix scenario name with the spaces replaced with underscores and colons replaced by equals.
name: ${{ steps.prepare_scenario.outputs.debug_data_artifact_name }}
path: ${{ env.ENOS_DEBUG_DATA_ROOT_DIR }}
retention-days: 30
- name: Ensure scenario has been destroyed
if: ${{ always() }}
Expand Down

0 comments on commit 65988ad

Please sign in to comment.