fix e2e latest debug image selection

This commit is contained in:
Leonard Cohnen 2022-09-13 10:01:44 +02:00 committed by 3u13r
parent 90e0f41bde
commit a318a82968

View File

@ -97,8 +97,7 @@ runs:
gcp)
if [ "${{ inputs.coreosImage == 'debug-latest' }}" = true ]
then
GCP_LATEST_FAMILY=$(gcloud compute images list --project constellation-images --filter="family ~ constellation-debug-v\d+-\d+-\d+" --format="value(family)" | sort --version-sort | tail -n 1)
GCP_IMAGE_NAME=$(gcloud compute images list --project constellation-images --filter="name ~ constellation-\d{10} AND family:${GCP_LATEST_FAMILY}" --sort-by=creationTimestamp --format="table(name)" | tail -n 1)
GCP_IMAGE_NAME=$(gcloud compute images list --project constellation-images --filter="name ~ constellation-\d{10} AND family~constellation-debug-v\d+-\d+-\d+" --sort-by=creationTimestamp --format="table(name)" | tail -n 1)
GCP_IMAGE="projects/constellation-images/global/images/${GCP_IMAGE_NAME}"
else
GCP_IMAGE=${{ inputs.coreosImage }}