-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use base_image/cloud.yml as release version SoT
Fixes: #135 Previously, a maintainer integrating a new OS release was required to update multiple files. Reduce this burden by encoding the release-version in base-image YAML and retrieving it as needed. This also has the added side-benefit of allowing the release version to be tagged on the images themselves for reference. Signed-off-by: Chris Evich <[email protected]>
- Loading branch information
Showing
8 changed files
with
80 additions
and
36 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
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,21 @@ | ||
#!/bin/bash | ||
|
||
# This script is intended to be called by the Makefile only. | ||
# Any other use may produce unexpected results. It expects | ||
# to be called with the name of a supported OS in all upper-case. | ||
# The value of the corresponding <NAME>_RELEASE variable will be | ||
# extracted from base_images/cloud.json and printed to stdout. | ||
|
||
set -eo pipefail | ||
|
||
SCRIPT_FILEPATH=$(realpath "${BASH_SOURCE[0]}") | ||
SCRIPT_DIRPATH=$(dirname "$SCRIPT_FILEPATH") | ||
REPO_DIRPATH=$(realpath "$SCRIPT_DIRPATH") | ||
CLOUD_JSON="$REPO_DIRPATH/base_images/cloud.json" | ||
|
||
# shellcheck source=./lib.sh | ||
source "$REPO_DIRPATH/lib.sh" | ||
|
||
[[ -r "$CLOUD_JSON" ]] || die "Cannot read from '$CLOUD_JSON'" | ||
|
||
jq -r -e ".variables.${1}_RELEASE" $CLOUD_JSON |
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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.