Skip to content
Snippets Groups Projects
Commit b79b51a7 authored by Thomas George Hartland's avatar Thomas George Hartland
Browse files

Sync alpha and beta image tags

This is mainly for the hyperkube containers,
to be able to test Magnum with alpha/beta
Kubernetes versions.

The handling for quotes/commas is also removed
as jq with the -r flag doesn't output them.
parent 1d2acefa
No related branches found
No related tags found
1 merge request!50Sync alpha and beta tags
Pipeline #1503476 passed
...@@ -8,7 +8,7 @@ upstream_json_resp="$(skopeo inspect docker://"${image}" | jq . -c)" ...@@ -8,7 +8,7 @@ upstream_json_resp="$(skopeo inspect docker://"${image}" | jq . -c)"
upstream_repo_image=$(echo "${upstream_json_resp}" | jq .Name -r) upstream_repo_image=$(echo "${upstream_json_resp}" | jq .Name -r)
image_name=$(basename "${upstream_repo_image}") image_name=$(basename "${upstream_repo_image}")
upstream_image_repo=$(dirname "${upstream_repo_image}") upstream_image_repo=$(dirname "${upstream_repo_image}")
tags_to_sync=$(echo "${upstream_json_resp}" | jq .RepoTags[] -r | egrep "^\"?v?([0-9]*)\.([0-9]*)\.([0-9]*)\"?\$" | sed 's/\"//g' | sed 's/,//') tags_to_sync=$(echo "${upstream_json_resp}" | jq -r '.RepoTags[] | select(test("^v?([0-9]*)\\.([0-9]*)\\.([0-9]*)((-alpha\\.[0-9]*)|(-beta\\.[0-9]*))?$"))')
# Get tags from CERN # Get tags from CERN
cern_json_resp="$(skopeo inspect docker://${CI_REGISTRY_IMAGE}/$(basename ${image}) | jq . -c)" cern_json_resp="$(skopeo inspect docker://${CI_REGISTRY_IMAGE}/$(basename ${image}) | jq . -c)"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment