forked from mattermost/mattermost
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enhance reporting, add shellcheck (mattermost#28240)
* Enhance reporting, add shellcheck --------- Co-authored-by: Mattermost Build <[email protected]>
- Loading branch information
1 parent
dfa1d10
commit 60b38bb
Showing
7 changed files
with
107 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
#!/bin/bash | ||
# SC2034: <variable> appears unused. | ||
# https://www.shellcheck.net/wiki/SC2034 | ||
# shellcheck disable=SC2034 | ||
# shellcheck disable=SC2086,SC2223 | ||
|
||
set -e -u -o pipefail | ||
cd "$(dirname "$0")" | ||
. .e2erc | ||
|
||
# The collected data will be written to the "e2e-tests/cypress/results/" directory | ||
cd ../cypress/ | ||
if [ ! -d "results/" ]; then | ||
mme2e_log "Error: 'results/' directory does not exist. Aborting report data collection." >&2 | ||
exit 1 | ||
fi | ||
|
||
# If the Automation Dashboard is used, try to collect run data from it | ||
if [ -n "${AUTOMATION_DASHBOARD_URL:-}" ]; then | ||
mme2e_log "Automation Dashboard usage detected: retrieving cycle results" | ||
# Assume that we're in the cypress dir and that the 'results/' directory exists | ||
: ${BUILD_ID:?} | ||
AD_CYCLE_FILE="results/ad_cycle.json" | ||
AD_SPECS_FILE="results/ad_specs.json" | ||
curl -o "$AD_CYCLE_FILE" -fsSL "${AUTOMATION_DASHBOARD_URL}/cycle?build=${BUILD_ID}" | ||
curl -o "$AD_SPECS_FILE" -fsSL "${AUTOMATION_DASHBOARD_URL}/executions/specs?cycle_id=$(jq -r .id "$AD_CYCLE_FILE")" | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters