Skip to content

Commit

Permalink
[cloud images] rename build_id to creation_timestamp tag
Browse files Browse the repository at this point in the history
As part of my work in scylladb/scylla-pkg#3827, i need to delete old
Azure images based on creation date, it seems that Azure doesn't have this information (make no sense),
to overcome this we should have a creation_timestamp date tag so we can use.

Also noticed that we don't really use the `build_id` tag, so replacing
it for all cloud images
  • Loading branch information
yaronkaikov committed May 1, 2024
1 parent 1d9ec76 commit 3871a24
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions packer/build_image.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
DIR=$(dirname $(readlink -f "$0"))
source "$DIR"/../SCYLLA-VERSION-GEN

BUILD_ID=$(date -u '+%FT%H-%M-%S')
CREATION_TIMESTAMP=$(date -u '+%FT%H-%M-%S')
OPERATING_SYSTEM="ubuntu22.04"
EXIT_STATUS=0
DRY_RUN=false
Expand Down Expand Up @@ -76,8 +76,8 @@ while [ $# -gt 0 ]; do
shift 2
;;
"--build-id")
BUILD_ID=$2
echo "--build-id parameter: BUILD_ID |$BUILD_ID|"
CREATION_TIMESTAMP=$2
echo "--build-id parameter: CREATION_TIMESTAMP |$CREATION_TIMESTAMP|"
shift 2
;;
"--scylla-build-sha-id")
Expand Down Expand Up @@ -353,7 +353,7 @@ set -x
-var scylla_jmx_version="$SCYLLA_JMX_VERSION" \
-var scylla_tools_version="$SCYLLA_TOOLS_VERSION" \
-var scylla_python3_version="$SCYLLA_PYTHON3_VERSION" \
-var scylla_build_id="$BUILD_ID" \
-var creation_timestamp="$CREATION_TIMESTAMP" \
-var scylla_build_sha_id="$SCYLLA_BUILD_SHA_ID" \
-var build_tag="$BUILD_TAG" \
-var operating_system="$OPERATING_SYSTEM" \
Expand Down
6 changes: 3 additions & 3 deletions packer/scylla.json
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@
"scylla_tools_version": "{{user `scylla_tools_version`}}",
"scylla_python3_version": "{{user `scylla_python3_version`}}",
"user_data_format_version": "3",
"build_id": "{{user `scylla_build_id`| clean_resource_name}}",
"creation_timestamp": "{{user `creation_timestamp`| clean_resource_name}}",
"branch": "{{user `branch`| clean_resource_name}}",
"operating_system": "{{user `operating_system`| clean_resource_name}}",
"scylla_build_sha_id": "{{user `scylla_build_sha_id`| clean_resource_name}}",
Expand Down Expand Up @@ -126,7 +126,7 @@
"scylla_tools_version": "{{user `scylla_tools_version`| clean_resource_name}}",
"scylla_python3_version": "{{user `scylla_python3_version`| clean_resource_name}}",
"user_data_format_version": "3",
"build_id": "{{user `scylla_build_id`| clean_resource_name}}",
"creation_timestamp": "{{user `creation_timestamp`| clean_resource_name}}",
"branch": "{{user `branch`| clean_resource_name}}",
"operating_system": "{{user `operating_system`| clean_resource_name}}",
"scylla_build_sha_id": "{{user `scylla_build_sha_id`| clean_resource_name}}",
Expand Down Expand Up @@ -162,7 +162,7 @@
"scylla_tools_version": "{{user `scylla_tools_version`}}",
"scylla_python3_version": "{{user `scylla_python3_version`}}",
"user_data_format_version": "3",
"build_id": "{{user `scylla_build_id`| clean_resource_name}}",
"creation_timestamp": "{{user `creation_timestamp`| clean_resource_name}}",
"branch": "{{user `branch`| clean_resource_name}}",
"operating_system": "{{user `operating_system`| clean_resource_name}}",
"scylla_build_sha_id": "{{user `scylla_build_sha_id`| clean_resource_name}}",
Expand Down

0 comments on commit 3871a24

Please sign in to comment.