Skip to content

Commit

Permalink
chore: set image version variable within scanning
Browse files Browse the repository at this point in the history
  • Loading branch information
jason1028kr committed Jan 16, 2025
1 parent a9d0b74 commit 804f812
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions vhdbuilder/packer/vhd-scanning.sh
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,12 @@ TRIVY_UPLOAD_TABLE_NAME="trivy-table-${BUILD_ID}-${TIMESTAMP}.txt"

# Extract date, revision from build number
BUILD_RUN_NUMBER=$(echo $BUILD_RUN_NUMBER | cut -d_ -f 1)

# set image version locally, if it is not set in environment variable
if [ -z "${IMAGE_VERSION}" ]; then
IMAGE_VERSION=$(date +%Y%m.%d.0)
fi

az vm run-command invoke \
--command-id RunShellScript \
--name $SCAN_VM_NAME \
Expand Down

0 comments on commit 804f812

Please sign in to comment.