-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CB-13635 Generate IMAGE_NAME at the beginning of the job into a prope…
…rties file and source it where we need it.
- Loading branch information
Showing
2 changed files
with
28 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#!/bin/bash | ||
#Used variables: | ||
# - BASE_NAME | ||
# - STACK_TYPE | ||
# - STACK_VERSION | ||
# - BUILD_ID | ||
|
||
STACK_VERSION_SHORT=${STACK_TYPE}-$(echo ${STACK_VERSION} | tr -d . | cut -c1-4 ) | ||
IMAGE_NAME=${BASE_NAME}-$(echo ${STACK_VERSION_SHORT} | tr '[:upper:]' '[:lower:]')-$(date +%s) | ||
|
||
echo IMAGE_NAME=${IMAGE_NAME} >> image.properties | ||
echo METADATA_FILENAME_POSTFIX=${BUILD_ID} >> image.properties |