forked from repo-mirrors/cnpg-postgres-containers
feat: generate a ClusterImageCatalog on image update (#97)
The image catalog YAML file will be committed an updated every time an image is updated, thus, we provide a catalog with all the images in this repo. Closes #96 Signed-off-by: Niccolò Fei <niccolo.fei@enterprisedb.com> Signed-off-by: Francesco Canovai <francesco.canovai@enterprisedb.com> Co-authored-by: Francesco Canovai <francesco.canovai@enterprisedb.com>
This commit is contained in:
7
.github/generate-strategy.sh
vendored
7
.github/generate-strategy.sh
vendored
@@ -49,12 +49,13 @@ for version in "${debian_versions[@]}"; do
|
||||
|
||||
# Initial aliases are "major version", "optional alias", "full version with release"
|
||||
# i.e. "14", "latest", "14.2-1", "14.2-debian","14.2"
|
||||
fullTag="${postgresImageVersion}-${releaseVersion}"
|
||||
versionAliases=(
|
||||
"${version}"
|
||||
${aliases[$version]:+"${aliases[$version]}"}
|
||||
"${postgresImageVersion}-${releaseVersion}"
|
||||
"${fullTag}"
|
||||
"${postgresImageVersion}"
|
||||
)
|
||||
)
|
||||
# Add all the version prefixes between full version and major version
|
||||
# i.e "13.2"
|
||||
while [ "$postgresImageVersion" != "$version" ] && [ "${postgresImageVersion%[.-]*}" != "$postgresImageVersion" ]; do
|
||||
@@ -66,7 +67,7 @@ for version in "${debian_versions[@]}"; do
|
||||
|
||||
# Build the json entry
|
||||
entries+=(
|
||||
"{\"name\": \"Debian ${postgresImageVersion}\", \"platforms\": \"$platforms\", \"dir\": \"Debian/$version\", \"file\": \"Debian/$version/Dockerfile\", \"version\": \"$version\", \"tags\": [\"$(join "\", \"" "${versionAliases[@]}")\"]}"
|
||||
"{\"name\": \"Debian ${postgresImageVersion}\", \"platforms\": \"$platforms\", \"dir\": \"Debian/$version\", \"file\": \"Debian/$version/Dockerfile\", \"version\": \"$version\", \"tags\": [\"$(join "\", \"" "${versionAliases[@]}")\"], \"fullTag\": \"${fullTag}\"}"
|
||||
)
|
||||
done
|
||||
|
||||
|
Reference in New Issue
Block a user