Skip to content
Snippets Groups Projects
Commit d8ce441b authored by Ravi Tripathi's avatar Ravi Tripathi
Browse files

Giving an option to use a predetermined image for xdmod

parent 20e2344b
No related branches found
No related tags found
1 merge request!10Giving an option to use a predetermined image for xdmod
......@@ -46,10 +46,15 @@ tf-apply:
tags: [build]
script:
- export BUILD_DATE=$(TZ=America/Chicago date +%Y%m%d%H%M%S)
- XDMOD_IMAGES=($(openstack image list --sort-column Name --sort-descending -f value -c Name -c ID | grep -P ' xdmod-\d{14}$' | awk '{print $2}'))
- export TF_VAR_image_ohpc="${XDMOD_IMAGES[0]}"
# - export TF_VAR_image_ohpc="xdmod-20230629191611"
- echo $TF_VAR_image_ohpc
- |
if [ -z $TF_VAR_image_ohpc ];
then
XDMOD_IMAGES=($(openstack image list --sort-column Name --sort-descending -f value -c Name -c ID | grep -P ' xdmod-\d{14}$' | awk '{print $2}'))
export TF_VAR_image_ohpc="${XDMOD_IMAGES[0]}"
echo $TF_VAR_image_ohpc
else
echo "image_ohpc defined as ${TF_VAR_image_ohpc}"
fi
- export TF_VAR_keypair_name="os-gen-keypair-$BUILD_DATE"
- terraform apply -auto-approve || terraform destroy -auto-approve
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment