Skip to content

Commit

Permalink
Gh-345: Actions doesn't push Gremlin image (#346)
Browse files Browse the repository at this point in the history
Change gremlin tag and improve logic for version tags with dependencies
  • Loading branch information
GCHQDeveloper314 authored Mar 21, 2024
1 parent 655248c commit 162a089
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions cd/publish_images.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,15 @@ getTags() {
fi
}

# Generate tags for Gaffer image based on version
# Generate tags based on Gaffer version and Dependency version
# Default is to tag version with full, major.minor.patch, major.minor, major, latest
getGafferTags() {
getTagsWithDependency() {
dependencyname=$1
if [[ $tagsetting = "onlyfull" ]];
then
tags="${name}:${version}"
else
tags="$(echo ${version} | sed -E "s|([0-9]+)\.([0-9]+)\.([0-9]+)-accumulo-([0-9.]*)|${name}:${version} ${name}:\1.\2.\3 ${name}:\1.\2 ${name}:\1 ${name}:latest|")"
tags="$(echo ${version} | sed -E "s|([0-9]+)\.([0-9]+)\.([0-9]+)-${dependencyname}-([0-9.]*)|${name}:${version} ${name}:\1.\2.\3 ${name}:\1.\2 ${name}:\1 ${name}:latest|")"
fi
}

Expand All @@ -56,9 +57,9 @@ pushContainer() {
name=$1
version=$2
tagsetting=$3
if [[ $version =~ .*accumulo.* ]];
then
getGafferTags
regex='[0-9]+\.[0-9]+\.[0-9]+-([[:alpha:]]+)-[0-9.]*'
if [[ $version =~ $regex ]]; then
getTagsWithDependency ${BASH_REMATCH[1]}
else
getTags
fi
Expand Down Expand Up @@ -101,7 +102,7 @@ pushContainer gchq/accumulo "${ACCUMULO_VERSION}"
pushContainer gchq/gaffer "${GAFFER_VERSION}-accumulo-${ACCUMULO_VERSION}"
pushContainer gchq/gaffer-rest "${GAFFER_VERSION}-accumulo-${ACCUMULO_VERSION}"
pushContainer gchq/gaffer-road-traffic-loader "${GAFFER_VERSION}"
pushContainer gchq/gaffer-gremlin "${GAFFER_VERSION}"
pushContainer gchq/gaffer-gremlin "${GAFFER_VERSION}-gremlin-${TINKERPOP_VERSION}"
pushContainer gchq/gaffer-pyspark-notebook "${GAFFER_VERSION}"
pushContainer gchq/gaffer-jhub-options-server "${JHUB_OPTIONS_SERVER_VERSION}"
pushContainer gchq/spark-py "${SPARK_VERSION}"
Expand Down

0 comments on commit 162a089

Please sign in to comment.