From 5f7014c924857258840019a2494caff84b64f0bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?jordan=20gonz=C3=A1lez?= <30836115+duncanista@users.noreply.github.com> Date: Mon, 5 Aug 2024 12:35:59 -0600 Subject: [PATCH 1/3] update scripts for manual release for GovCloud --- scripts/publish_prod.sh | 36 +++++++++++++++++++++++++++--------- 1 file changed, 27 insertions(+), 9 deletions(-) diff --git a/scripts/publish_prod.sh b/scripts/publish_prod.sh index 1f7c4054f..c7a8398c7 100755 --- a/scripts/publish_prod.sh +++ b/scripts/publish_prod.sh @@ -69,22 +69,40 @@ aws-vault exec sso-prod-engineering -- aws sts get-caller-identity echo "Checking that you have access to the GovCloud AWS account" aws-vault exec sso-govcloud-us1-fed-engineering -- aws sts get-caller-identity -VERSION=$VERSION AGENT_VERSION=$AGENT_VERSION ./scripts/build_binary_and_layer_dockerized.sh +echo "Answer 'n' if already downloaded artifacts from GitLab" +read -p "Ready to build binaries and layers? (y/n)" CONT +if [ "$CONT" == "y" ]; then + VERSION=$VERSION AGENT_VERSION=$AGENT_VERSION ./scripts/build_binary_and_layer_dockerized.sh -echo "Signing the layer" -aws-vault exec sso-prod-engineering -- ./scripts/sign_layers.sh prod + echo "Signing the layer" + aws-vault exec sso-prod-engineering -- ./scripts/sign_layers.sh prod +fi -echo "Publishing layers to commercial AWS regions" -aws-vault exec sso-prod-engineering --no-session -- ./scripts/publish_layers.sh +echo "Answer 'n' if already done by GitLab" +read -p "Deploy layers to commercial AWS (y/n)?" CONT +if [ "$CONT" == "y" ]; then + echo "Publishing layers to commercial AWS regions" + aws-vault exec sso-prod-engineering --no-session -- ./scripts/publish_layers.sh +fi echo "Publishing layers to GovCloud AWS regions" aws-vault exec sso-govcloud-us1-fed-engineering -- ./scripts/publish_layers.sh -./scripts/build_and_push_docker_image.sh -echo "Creating tag in the datadog-lambda-extension repository for release on GitHub" -git tag "v$VERSION" -git push origin "refs/tags/v$VERSION" +echo "Answer 'n' if already done by GitLab" +read -p "Deploy docker images to DockerHub? (y/n)?" CONT +if [ "$CONT" == "y" ]; then + echo "Publishing images to DockerHub" + ./scripts/build_and_push_docker_image.sh +fi + +echo "Answer 'n' if already done for GitLab" +read -p "Ready to tag v${VERSION}? (y/n)" CONT +if [ "$CONT" == "y" ]; then + echo "Creating tag in the datadog-lambda-extension repository for release on GitHub" + git tag "v$VERSION" + git push origin "refs/tags/v$VERSION" +fi echo "New extension version published to AWS and Dockerhub!" echo From d7fbf9fb5fc90697ea4fb24cef797707558def19 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?jordan=20gonz=C3=A1lez?= <30836115+duncanista@users.noreply.github.com> Date: Mon, 5 Aug 2024 12:43:32 -0600 Subject: [PATCH 2/3] update a gate text --- scripts/publish_prod.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/publish_prod.sh b/scripts/publish_prod.sh index c7a8398c7..8ff7816b8 100755 --- a/scripts/publish_prod.sh +++ b/scripts/publish_prod.sh @@ -70,7 +70,7 @@ echo "Checking that you have access to the GovCloud AWS account" aws-vault exec sso-govcloud-us1-fed-engineering -- aws sts get-caller-identity echo "Answer 'n' if already downloaded artifacts from GitLab" -read -p "Ready to build binaries and layers? (y/n)" CONT +read -p "Ready to build, and sign, binaries and layers? (y/n)" CONT if [ "$CONT" == "y" ]; then VERSION=$VERSION AGENT_VERSION=$AGENT_VERSION ./scripts/build_binary_and_layer_dockerized.sh From 24bcb0be1c2f53304e2be61a91d4b919d3ee4b9b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?jordan=20gonz=C3=A1lez?= <30836115+duncanista@users.noreply.github.com> Date: Mon, 5 Aug 2024 12:44:17 -0600 Subject: [PATCH 3/3] also gate GovCloud --- scripts/publish_prod.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/scripts/publish_prod.sh b/scripts/publish_prod.sh index 8ff7816b8..b744aabee 100755 --- a/scripts/publish_prod.sh +++ b/scripts/publish_prod.sh @@ -85,9 +85,11 @@ if [ "$CONT" == "y" ]; then aws-vault exec sso-prod-engineering --no-session -- ./scripts/publish_layers.sh fi -echo "Publishing layers to GovCloud AWS regions" -aws-vault exec sso-govcloud-us1-fed-engineering -- ./scripts/publish_layers.sh - +read -p "Deploy layers to GovCloud AWS (y/n)?" CONT +if [ "$CONT" == "y" ]; then + echo "Publishing layers to GovCloud AWS regions" + aws-vault exec sso-govcloud-us1-fed-engineering -- ./scripts/publish_layers.sh +fi echo "Answer 'n' if already done by GitLab" read -p "Deploy docker images to DockerHub? (y/n)?" CONT