-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Download Application log files and upload as an artifact when enos scenarios fail #19860
Changes from 3 commits
00f0ee4
965ce4d
6fd74b7
65988ad
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -104,6 +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 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: hashicorp/setup-terraform@v2 | ||
|
@@ -148,6 +149,14 @@ jobs: | |
id: run_retry | ||
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' | ||
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 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This will be relative to repo root, so we will need to add |
||
retention-days: 30 | ||
- name: Ensure scenario has been destroyed | ||
if: ${{ always() }} | ||
# With Enos version 0.0.11 the destroy step returns an error if the infrastructure | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we don't zip this directory, so don't need the
.zip
extension in the name