Skip to content

Commit e6580ea

Browse files
lym953claude
andauthored
[SVLS-8969] feat(scripts): add fed-us2 environment support to publish_govcloud_layers.sh (#1192)
## Summary - Adds `fed-us2` as a supported `ENVIRONMENT` value in `publish_govcloud_layers.sh` - Uses the `sso-govcloud-fed-us2-lambda-layer-operator` AWS Vault role - Matches `us1-fed` behavior: requires explicit `VERSION`, enables layer version permissions, disables auto-bump ## Testing Ran the script and published the layers to fed-us2. --------- Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 4ccbf5d commit e6580ea

1 file changed

Lines changed: 18 additions & 2 deletions

File tree

scripts/publish_govcloud_layers.sh

Lines changed: 18 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] [PIPELINE_LAYER_SUFFIX=optional-layer-suffix] [REGIONS=us-gov-west-1] ./scripts/publish_govcloud_layers.sh <layer-bundle.zip>
12+
# ENVIRONMENT=[us1-staging-fed or us1-fed or fed-us2] [PIPELINE_LAYER_SUFFIX=optional-layer-suffix] [REGIONS=us-gov-west-1] ./scripts/publish_govcloud_layers.sh <layer-bundle.zip>
1313
#
1414
# protip: you can drag the zip file from finder into your terminal to insert
1515
# its path.
@@ -57,8 +57,24 @@ elif [ $ENVIRONMENT = "us1-fed" ]; then
5757
exit 1
5858
fi
5959

60+
elif [ "$ENVIRONMENT" = "fed-us2" ]; then
61+
AWS_VAULT_ROLE=sso-govcloud-fed-us2-lambda-layer-operator
62+
63+
export ADD_LAYER_VERSION_PERMISSIONS=1
64+
export AUTOMATICALLY_BUMP_VERSION=0
65+
66+
if [[ -z "$VERSION" ]]; then
67+
printf "[ERROR]: VERSION not specified\n"
68+
exit 1
69+
fi
70+
71+
if [[ ! "$PACKAGE_NAME" =~ ^datadog_extension-signed-bundle-[0-9]+$ ]]; then
72+
echo "[ERROR]: Unexpected package name: $PACKAGE_NAME"
73+
exit 1
74+
fi
75+
6076
else
61-
printf "[ERROR]: ENVIRONMENT not supported, must be us1-staging-fed or us1-fed.\n"
77+
printf "[ERROR]: ENVIRONMENT not supported, must be us1-staging-fed, us1-fed, or fed-us2.\n"
6278
exit 1
6379
fi
6480

0 commit comments

Comments
 (0)