Skip to content
Snippets Groups Projects
Verified Commit 9f315d37 authored by Varac's avatar Varac
Browse files

[CI] Check for mandatory env variables on platform builds

parent 30a4bc4e
Branches
Tags
No related merge requests found
......@@ -54,6 +54,11 @@ else
}
fi
fail() {
echo "$*"
exit 1
}
deploy() {
LEAP_CMD deploy "$TAG"
}
......@@ -73,6 +78,11 @@ build_from_scratch() {
# Dsiable xtrace
set +x
[ -z "$AWS_ACCESS_KEY" ] && fail "\$AWS_ACCESS_KEY is not set - please provide it as env variable."
[ -z "$AWS_SECRET_KEY" ] && fail "\$AWS_SECRET_KEY is not set - please provide it as env variable."
[ -z "$SSH_PRIVATE_KEY" ] && fail "\$SSH_PRIVATE_KEY is not set - please provide it as env variable."
/usr/bin/jq ".platform_ci.auth |= .+ {\"aws_access_key_id\":\"$AWS_ACCESS_KEY\", \"aws_secret_access_key\":\"$AWS_SECRET_KEY\"}" < cloud.json.template > cloud.json
# Enable xtrace again only if it was set at beginning of script
[[ $xtrace == true ]] && set -x
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment