Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(cloud images): add environment default tag #566

Merged
merged 1 commit into from
Dec 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions packer/build_image.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ DRY_RUN=false
DEBUG=false
BUILD_MODE='release'
TARGET=
ENV_TAG="debug"

print_usage() {
echo "$0 --repo [URL] --target [distribution]"
Expand All @@ -26,6 +27,7 @@ print_usage() {
echo " [--branch] Set the release branch for GCE label. Default: master"
echo " [--ami-regions] Set regions to copy the AMI when done building it (including permissions and tags)"
echo " [--build-tag] Jenkins Build tag"
echo " [--env-tag] Environment tag for our images. default: debug. Valid options: daily(master)|candidate(releases)|production(releases)|private(custom images for customers)"
echo " [--build-mode] Choose which build mode to use for Scylla installation. Default: release. Valid options: release|debug"
echo " [--debug] Build debug image with special prefix for image name. Default: false."
echo " [--log-file] Path for log. Default build/ami.log on current dir. Default: build/packer.log"
Expand Down Expand Up @@ -72,6 +74,11 @@ while [ $# -gt 0 ]; do
echo "--build-tag parameter: BUILD_TAG |$BUILD_TAG|"
shift 2
;;
"--env-tag")
ENV_TAG=$2
echo "--env-tag parameter: ENV_TAG |$ENV_TAG|"
shift 2
;;
"--version")
VERSION=$2
echo "--version: VERSION |$VERSION|"
Expand Down Expand Up @@ -264,6 +271,7 @@ set -x
-var creation_timestamp="$CREATION_TIMESTAMP" \
-var scylla_build_sha_id="$SCYLLA_BUILD_SHA_ID" \
-var build_tag="$BUILD_TAG" \
-var environment="$ENV_TAG" \
-var operating_system="$OPERATING_SYSTEM" \
-var branch="$BRANCH" \
-var ami_regions="$AMI_REGIONS" \
Expand Down
3 changes: 3 additions & 0 deletions packer/scylla.json
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@
"scylla_build_sha_id": "{{user `scylla_build_sha_id`| clean_resource_name}}",
"arch": "{{user `arch`| clean_resource_name}}",
"build_tag": "{{user `build_tag`| clean_resource_name}}",
"environment": "{{user `environment`| clean_resource_name}}",
"build_mode": "{{user `build_mode`| clean_resource_name}}"
},
"ami_regions": "{{user `ami_regions`}}",
Expand Down Expand Up @@ -127,6 +128,7 @@
"scylla_build_sha_id": "{{user `scylla_build_sha_id`| clean_resource_name}}",
"arch": "{{user `arch`| clean_resource_name}}",
"build_tag": "{{user `build_tag`| clean_resource_name}}",
"environment": "{{user `environment`| clean_resource_name}}",
"build_mode": "{{user `build_mode`| clean_resource_name}}"
},
"labels": {
Expand Down Expand Up @@ -161,6 +163,7 @@
"scylla_build_sha_id": "{{user `scylla_build_sha_id`| clean_resource_name}}",
"arch": "{{user `arch`| clean_resource_name}}",
"build_tag": "{{user `build_tag`| clean_resource_name}}",
"environment": "{{user `environment`| clean_resource_name}}",
"build_mode": "{{user `build_mode`| clean_resource_name}}"
},
"vm_size": "{{user `vm_size`}}",
Expand Down
Loading