Skip to content

Commit d997802

Browse files
Onzia/add us2 (#802)
* add us-2 * typo * update aws role * update usage comment
1 parent 3e09417 commit d997802

1 file changed

Lines changed: 10 additions & 2 deletions

File tree

scripts/publish_govcloud.sh

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
# Download button on the `layer bundle` job. This will be a zip file containing
1010
# all of the required layers. Run this script as follows:
1111
#
12-
# ENVIRONMENT=[us1-staging-fed or us1-fed] [LAYER_NAME_SUFFIX=optional-layer-suffix] [REGIONS=us-gov-west-1] ./scripts/publish_govcloud.sh <layer-bundle.zip>
12+
# CI_COMMIT_TAG=<vX.Y.Z> ENVIRONMENT=[us1-staging-fed|us1-fed|us2-fed] [LAYER_NAME_SUFFIX=optional-layer-suffix] [REGIONS=us-gov-west-1] ./scripts/publish_govcloud.sh <layer-bundle.zip>
1313
#
1414
# protip: you can drag the zip file from finder into your terminal to insert
1515
# its path.
@@ -49,9 +49,17 @@ elif [ $ENVIRONMENT = "us1-fed" ]; then
4949
echo "[ERROR]: Unexpected package name: $PACKAGE_NAME"
5050
exit 1
5151
fi
52+
elif [ $ENVIRONMENT = "us2-fed" ]; then
53+
AWS_VAULT_ROLE=sso-govcloud-fed-us2-lambda-layer-operator
5254

55+
export STAGE=gov-prod
56+
57+
if [[ ! "$PACKAGE_NAME" =~ ^datadog_lambda_py-signed-bundle-[0-9]+$ ]]; then
58+
echo "[ERROR]: Unexpected package name: $PACKAGE_NAME"
59+
exit 1
60+
fi
5361
else
54-
printf "[ERROR]: ENVIRONMENT not supported, must be us1-staging-fed or us1-fed.\n"
62+
printf "[ERROR]: ENVIRONMENT not supported, must be us1-staging-fed, us1-fed, or us2-fed.\n"
5563
exit 1
5664
fi
5765

0 commit comments

Comments
 (0)