summaryrefslogtreecommitdiff
path: root/hack
diff options
context:
space:
mode:
authorChris Evich <cevich@redhat.com>2019-01-17 12:30:27 -0500
committerChris Evich <cevich@redhat.com>2019-01-17 13:30:06 -0500
commitd0876282a42aeb93322fe80cae79c2d160bff350 (patch)
tree150e708f1d4ecdf4aa645de4efac36900f2cf6cc /hack
parent0e3264ae4de85d2c974106582f80fd8cadab8bb8 (diff)
downloadpodman-d0876282a42aeb93322fe80cae79c2d160bff350.tar.gz
podman-d0876282a42aeb93322fe80cae79c2d160bff350.tar.bz2
podman-d0876282a42aeb93322fe80cae79c2d160bff350.zip
Cirrus: Consolidate VM image names in once place
Previously it was not possible to specify keys from the ``env`` section in the various GCE sections. Now that features is added, consolidate all the cache image definitions into a single place, reducing maintenance burden. This also results in the names passing through into the VMs. This is useful, e.g. for future tracking of image usage statistics. Update get_ci_vm script hints for new image name definition format Signed-off-by: Chris Evich <cevich@redhat.com>
Diffstat (limited to 'hack')
-rwxr-xr-xhack/get_ci_vm.sh12
1 files changed, 8 insertions, 4 deletions
diff --git a/hack/get_ci_vm.sh b/hack/get_ci_vm.sh
index e1d8e42b9..b058b4273 100755
--- a/hack/get_ci_vm.sh
+++ b/hack/get_ci_vm.sh
@@ -54,15 +54,19 @@ delvm() {
showrun $CLEANUP_CMD # prompts for Yes/No
}
-show_usage(){
+image_hints() {
+ egrep '[[:space:]]+[[:alnum:]].+_CACHE_IMAGE_NAME:[[:space:]+"[[:print:]]+"' \
+ "$LIBPODROOT/.cirrus.yml" | cut -d: -f 2 | tr -d '"[:blank:]' | \
+ grep -v 'notready' | grep -v 'image-builder' | sort -u
+}
+
+show_usage() {
echo -e "\n${RED}ERROR: $1${NOR}"
echo -e "${YEL}Usage: $(basename $0) [-s | -p] <image_name>${NOR}\n"
if [[ -r ".cirrus.yml" ]]
then
- egrep 'image_name' ".cirrus.yml" | grep -v '#' | cut -d: -f 2 | \
- tr -d [:blank:] | sort -u > "$TEMPFILE"
echo -e "${YEL}Some possible image_name values (from .cirrus.yml):${NOR}"
- cat $TEMPFILE
+ image_hints
echo ""
fi
exit 1