-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6499e11
commit df8d72b
Showing
8 changed files
with
222 additions
and
82 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
# This file used for import in other files | ||
|
||
RED='\033[0;31m' | ||
NC='\033[0m' | ||
|
||
function check_mandatory_vars() { | ||
|
||
declare -a mandatory | ||
declare -a allure_mandatory | ||
|
||
mandatory=( | ||
WALLARM_API_TOKEN | ||
WALLARM_API_HOST | ||
WALLARM_API_PRESET | ||
CLIENT_ID | ||
USER_TOKEN | ||
WEBHOOK_API_KEY | ||
WEBHOOK_UUID | ||
SMOKE_REGISTRY_TOKEN | ||
SMOKE_REGISTRY_SECRET | ||
) | ||
|
||
env_list="" | ||
|
||
for var in "${mandatory[@]}"; do | ||
if [[ -z "${!var:-}" ]]; then | ||
env_list+=" $var" | ||
fi | ||
done | ||
|
||
if [[ "${ALLURE_UPLOAD_REPORT:-false}" == "true" ]]; then | ||
|
||
allure_mandatory=( | ||
ALLURE_TOKEN | ||
ALLURE_ENVIRONMENT_ARCH | ||
ALLURE_PROJECT_ID | ||
ALLURE_GENERATE_REPORT | ||
ALLURE_ENVIRONMENT_K8S | ||
) | ||
|
||
for var in "${allure_mandatory[@]}"; do | ||
if [[ -z "${!var:-}" ]]; then | ||
env_list+=" $var" | ||
fi | ||
done | ||
fi | ||
|
||
if [[ -n "$env_list" ]]; then | ||
for var in ${env_list}; do | ||
echo -e "${RED}Environment variable $var must be set${NC}" | ||
done | ||
exit 1 | ||
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
Oops, something went wrong.