diff --git a/packer/build_image.sh b/packer/build_image.sh index 4f78cba75..38e66b7cc 100755 --- a/packer/build_image.sh +++ b/packer/build_image.sh @@ -14,8 +14,13 @@ DRY_RUN=false DEBUG=false BUILD_MODE='release' TARGET= +<<<<<<< HEAD APT_KEYS_DIR='/etc/apt/keyrings' APT_KEY='d0a112e067426ab2' +||||||| parent of d1c40d3 ((cloud images): add `environment` tag) +======= +ENV_TAG="debug" +>>>>>>> d1c40d3 ((cloud images): add `environment` tag) print_usage() { echo "$0 --localdeb --repo [URL] --target [distribution]" @@ -31,7 +36,12 @@ print_usage() { echo " [--ami-regions] Set regions to copy the AMI when done building it (including permissions and tags)" echo " [--ami-users] A list of account IDs that have access to launch the AMI" echo " [--build-tag] Jenkins Build tag" +<<<<<<< HEAD echo " --download-no-server Download all deb needed excluding scylla from repo-for-install" +||||||| parent of d1c40d3 ((cloud images): add `environment` tag) +======= + echo " [--env-tag] Environment tag for our images. default: debug. Valid options: daily(master)|candidate(releases)|production(releases)|private(custom images for customers)" +>>>>>>> d1c40d3 ((cloud images): add `environment` tag) 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" @@ -90,6 +100,45 @@ while [ $# -gt 0 ]; do echo "--build-tag parameter: BUILD_TAG |$BUILD_TAG|" shift 2 ;; +<<<<<<< HEAD +||||||| parent of d1c40d3 ((cloud images): add `environment` tag) + "--version") + VERSION=$2 + echo "--version: VERSION |$VERSION|" + shift 2 + ;; + "--scylla-release") + SCYLLA_RELEASE=$2 + echo "--scylla-release: SCYLLA_RELEASE |$SCYLLA_RELEASE|" + shift 2 + ;; + "--scylla-machine-image-release") + SCYLLA_MACHINE_IMAGE_RELEASE=$2 + echo "--scylla-machine-image-release: SCYLLA_MACHINE_IMAGE_RELEASE |$SCYLLA_MACHINE_IMAGE_RELEASE|" + shift 2 + ;; +======= + "--env-tag") + ENV_TAG=$2 + echo "--env-tag parameter: ENV_TAG |$ENV_TAG|" + shift 2 + ;; + "--version") + VERSION=$2 + echo "--version: VERSION |$VERSION|" + shift 2 + ;; + "--scylla-release") + SCYLLA_RELEASE=$2 + echo "--scylla-release: SCYLLA_RELEASE |$SCYLLA_RELEASE|" + shift 2 + ;; + "--scylla-machine-image-release") + SCYLLA_MACHINE_IMAGE_RELEASE=$2 + echo "--scylla-machine-image-release: SCYLLA_MACHINE_IMAGE_RELEASE |$SCYLLA_MACHINE_IMAGE_RELEASE|" + shift 2 + ;; +>>>>>>> d1c40d3 ((cloud images): add `environment` tag) "--branch") BRANCH=$2 echo "--branch parameter: BRANCH |$BRANCH|" @@ -357,6 +406,7 @@ set -x -var scylla_build_id="$BUILD_ID" \ -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" \ diff --git a/packer/scylla.json b/packer/scylla.json index d6afd25cf..63eaa242b 100644 --- a/packer/scylla.json +++ b/packer/scylla.json @@ -87,6 +87,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`}}", @@ -132,6 +133,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": { @@ -168,6 +170,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`}}",