Skip to content

Commit b46e0e8

Browse files
chore: better VERSION handling for publishing layers
1 parent a83f4e8 commit b46e0e8

2 files changed

Lines changed: 7 additions & 0 deletions

File tree

.gitlab/scripts/publish_layers.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,8 @@ if [ "$AUTOMATICALLY_BUMP_VERSION" = "1" ]; then
104104
else
105105
if [ -z "$CI_COMMIT_TAG" ]; then
106106
if [ -n "$VERSION" ]; then
107+
# This is used in our publish_govcloud_layers.sh script. We set the
108+
# VERSION manually there since we don't have a CI_COMMIT_TAG.
107109
printf "VERSION exists so we should be okay to continue\n"
108110
else
109111
printf "[ERROR]: No CI_COMMIT_TAG found and VERSION is not nuymeric.\n"

scripts/publish_govcloud_layers.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,11 @@ elif [ $ENVIRONMENT = "us1-fed" ]; then
4747
export ADD_LAYER_VERSION_PERMISSIONS=1
4848
export AUTOMATICALLY_BUMP_VERSION=0
4949

50+
if [[ -z "$VERSION" ]]; then
51+
printf "[ERROR]: VERSION not specified\n"
52+
exit 1
53+
fi
54+
5055
if [[ ! "$PACKAGE_NAME" =~ ^datadog_extension-signed-bundle-[0-9]+$ ]]; then
5156
echo "[ERROR]: Unexpected package name: $PACKAGE_NAME"
5257
exit 1

0 commit comments

Comments
 (0)