Skip to content

Commit e73cdf4

Browse files
authored
chore: update scripts for manual releases (#350)
* update scripts for manual release for GovCloud * update a gate text * also gate GovCloud
1 parent 31b454d commit e73cdf4

File tree

1 file changed

+31
-11
lines changed

1 file changed

+31
-11
lines changed

scripts/publish_prod.sh

Lines changed: 31 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -69,22 +69,42 @@ aws-vault exec sso-prod-engineering -- aws sts get-caller-identity
6969
echo "Checking that you have access to the GovCloud AWS account"
7070
aws-vault exec sso-govcloud-us1-fed-engineering -- aws sts get-caller-identity
7171

72-
VERSION=$VERSION AGENT_VERSION=$AGENT_VERSION ./scripts/build_binary_and_layer_dockerized.sh
72+
echo "Answer 'n' if already downloaded artifacts from GitLab"
73+
read -p "Ready to build, and sign, binaries and layers? (y/n)" CONT
74+
if [ "$CONT" == "y" ]; then
75+
VERSION=$VERSION AGENT_VERSION=$AGENT_VERSION ./scripts/build_binary_and_layer_dockerized.sh
7376

74-
echo "Signing the layer"
75-
aws-vault exec sso-prod-engineering -- ./scripts/sign_layers.sh prod
77+
echo "Signing the layer"
78+
aws-vault exec sso-prod-engineering -- ./scripts/sign_layers.sh prod
79+
fi
7680

77-
echo "Publishing layers to commercial AWS regions"
78-
aws-vault exec sso-prod-engineering --no-session -- ./scripts/publish_layers.sh
81+
echo "Answer 'n' if already done by GitLab"
82+
read -p "Deploy layers to commercial AWS (y/n)?" CONT
83+
if [ "$CONT" == "y" ]; then
84+
echo "Publishing layers to commercial AWS regions"
85+
aws-vault exec sso-prod-engineering --no-session -- ./scripts/publish_layers.sh
86+
fi
7987

80-
echo "Publishing layers to GovCloud AWS regions"
81-
aws-vault exec sso-govcloud-us1-fed-engineering -- ./scripts/publish_layers.sh
88+
read -p "Deploy layers to GovCloud AWS (y/n)?" CONT
89+
if [ "$CONT" == "y" ]; then
90+
echo "Publishing layers to GovCloud AWS regions"
91+
aws-vault exec sso-govcloud-us1-fed-engineering -- ./scripts/publish_layers.sh
92+
fi
8293

83-
./scripts/build_and_push_docker_image.sh
94+
echo "Answer 'n' if already done by GitLab"
95+
read -p "Deploy docker images to DockerHub? (y/n)?" CONT
96+
if [ "$CONT" == "y" ]; then
97+
echo "Publishing images to DockerHub"
98+
./scripts/build_and_push_docker_image.sh
99+
fi
84100

85-
echo "Creating tag in the datadog-lambda-extension repository for release on GitHub"
86-
git tag "v$VERSION"
87-
git push origin "refs/tags/v$VERSION"
101+
echo "Answer 'n' if already done for GitLab"
102+
read -p "Ready to tag v${VERSION}? (y/n)" CONT
103+
if [ "$CONT" == "y" ]; then
104+
echo "Creating tag in the datadog-lambda-extension repository for release on GitHub"
105+
git tag "v$VERSION"
106+
git push origin "refs/tags/v$VERSION"
107+
fi
88108

89109
echo "New extension version published to AWS and Dockerhub!"
90110
echo

0 commit comments

Comments
 (0)