Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/container_maintenance.yml
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,6 @@ jobs:
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
repository: gdcc/base
repository: gdcc/configbaker
short-description: "Dataverse Config Baker Container Image providing setup tooling and more"
readme-filepath: ./modules/container-configbaker/README.md
11 changes: 5 additions & 6 deletions .github/workflows/scripts/containers/maintain-application.sh
Original file line number Diff line number Diff line change
Expand Up @@ -126,15 +126,15 @@ for BRANCH in "$@"; do
# 6. Let's put together what tags we want added to this build run
TAG_OPTIONS=""
if ! (( IS_DEV )); then
TAG_OPTIONS="-Dapp.image=$APP_IMAGE_REF -Ddocker.tags.revision=$NEXT_REV_TAG"
TAG_OPTIONS="-Dapp.image=$APP_IMAGE_REF -Dapp.image.tag.1=$NEXT_REV_TAG"
# In case of the current release, add the "latest" tag as well.
if (( IS_CURRENT_RELEASE )); then
TAG_OPTIONS="$TAG_OPTIONS -Ddocker.tags.latest=latest"
TAG_OPTIONS="$TAG_OPTIONS -Dapp.image.tag.2=latest"
fi
else
# shellcheck disable=SC2016
UPCOMING_TAG=$( mvn initialize help:evaluate -Pct -f . -Dexpression=app.image.tag -Dapp.image.tag='${app.image.version}-${base.image.flavor}' -q -DforceStdout )
TAG_OPTIONS="-Ddocker.tags.upcoming=$UPCOMING_TAG"
TAG_OPTIONS="-Dapp.image.tag.1=$UPCOMING_TAG"

# For the dev branch we only have rolling tags and can add them now already
SUPPORTED_ROLLING_TAGS+=("[\"unstable\", \"$UPCOMING_TAG\"]")
Expand All @@ -148,9 +148,8 @@ for BRANCH in "$@"; do
# Build the application image, but skip the configbaker image (that's a different job)!
# shellcheck disable=SC2046
mvn -Pct -f . deploy -Ddocker.noCache -Ddocker.platforms="${PLATFORMS}" \
-Dconf.skipBuild -Dbase.image="${BASE_IMAGE_REF}" \
-Ddocker.imagePropertyConfiguration=override $TAG_OPTIONS \
$( if (( DAMP_RUN )); then echo "-Ddocker.skip.push -Ddocker.skip.tag"; fi )
-Dconf.skipBuild -Dbase.image="${BASE_IMAGE_REF}" $TAG_OPTIONS \
$( if (( DAMP_RUN )); then echo "-Ddocker.skip.push"; fi )
else
echo "Skipping Maven build as requested by DRY_RUN=1"
fi
Expand Down
11 changes: 9 additions & 2 deletions .github/workflows/scripts/containers/maintain-base.sh
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,13 @@ for BRANCH in "$@"; do
CURRENT_REV_TAG="${BASE_IMAGE_REF#*:}-r$REV"
NEXT_REV_TAG="${BASE_IMAGE_REF#*:}-r$(( REV + 1 ))"

# 6a. Determine if we must newly release an "r0" because a rolling tag from development is now released.
IS_NEW_RELEASE=0
if ! (( IS_DEV )) && [ "$REV" = "-1" ]; then
echo "This is a newly released version of Dataverse - forcing build, as no r0 image is present on Docker Hub"
IS_NEW_RELEASE=1
fi

# 7. Let's put together what tags we want added to this build run
TAG_OPTIONS=""
if ! (( IS_DEV )); then
Expand All @@ -139,12 +146,12 @@ for BRANCH in "$@"; do

# 8. Let's build the base image if necessary
NEWER_IMAGE=0
if (( NEWER_JAVA_IMAGE + NEWER_PKGS + FORCE_BUILD > 0 )); then
if (( NEWER_JAVA_IMAGE + NEWER_PKGS + IS_NEW_RELEASE + FORCE_BUILD > 0 )); then
if ! (( DRY_RUN )); then
# shellcheck disable=SC2046
mvn -Pct -f modules/container-base deploy -Ddocker.noCache -Ddocker.platforms="${PLATFORMS}" \
-Ddocker.imagePropertyConfiguration=override $TAG_OPTIONS \
$( if (( DAMP_RUN )); then echo "-Ddocker.skip.push -Ddocker.skip.tag"; fi )
$( if (( DAMP_RUN )); then echo "-Ddocker.skip.push"; fi )
else
echo "Skipping Maven build as requested by DRY_RUN=1"
fi
Expand Down
11 changes: 5 additions & 6 deletions .github/workflows/scripts/containers/maintain-configbaker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -122,15 +122,15 @@ for BRANCH in "$@"; do
# 6. Let's put together what tags we want added to this build run
TAG_OPTIONS=""
if ! (( IS_DEV )); then
TAG_OPTIONS="-Dconf.image=$CONFIG_IMAGE_REF -Ddocker.tags.revision=$NEXT_REV_TAG"
TAG_OPTIONS="-Dconf.image=$CONFIG_IMAGE_REF -Dconf.image.tag.1=$NEXT_REV_TAG"
# In case of the current release, add the "latest" tag as well.
if (( IS_CURRENT_RELEASE )); then
TAG_OPTIONS="$TAG_OPTIONS -Ddocker.tags.latest=latest"
TAG_OPTIONS="$TAG_OPTIONS -Dconf.image.tag.2=latest"
fi
else
# shellcheck disable=SC2016
UPCOMING_TAG=$( mvn initialize help:evaluate -Pct -f . -Dexpression=conf.image.tag -Dconf.image.tag='${app.image.version}-${conf.image.flavor}' -q -DforceStdout )
TAG_OPTIONS="-Ddocker.tags.upcoming=$UPCOMING_TAG"
TAG_OPTIONS="-Dconf.image.tag.1=$UPCOMING_TAG"

# For the dev branch we only have rolling tags and can add them now already
SUPPORTED_ROLLING_TAGS+=("[\"unstable\", \"$UPCOMING_TAG\"]")
Expand All @@ -145,9 +145,8 @@ for BRANCH in "$@"; do
# shellcheck disable=SC2046
mvn -Pct -f . deploy -Ddocker.noCache -Ddocker.platforms="${PLATFORMS}" \
-Dapp.skipBuild -Dconf.image.base="${BASE_IMAGE_REF}" \
-Dmaven.main.skip -Dmaven.test.skip -Dmaven.war.skip \
-Ddocker.imagePropertyConfiguration=override $TAG_OPTIONS \
$( if (( DAMP_RUN )); then echo "-Ddocker.skip.push -Ddocker.skip.tag"; fi )
-Dmaven.main.skip -Dmaven.test.skip -Dmaven.war.skip $TAG_OPTIONS \
$( if (( DAMP_RUN )); then echo "-Ddocker.skip.push"; fi )
else
echo "Skipping Maven build as requested by DRY_RUN=1"
fi
Expand Down
14 changes: 14 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1128,6 +1128,9 @@
Note: During maintenance we will use the app.image.version setting from the DV parent POM.
-->
<app.image.tag>unstable</app.image.tag>
<!-- Additional tags. Ignored by default (empty), used by maintenance action. -->
<app.image.tag.1></app.image.tag.1>
<app.image.tag.2></app.image.tag.2>
<app.skipBuild>false</app.skipBuild>
<app.skipDeploy>false</app.skipDeploy>

Expand All @@ -1142,6 +1145,9 @@
<conf.image>gdcc/configbaker:${conf.image.tag}</conf.image>
<!-- By default, we use the same tag as the app image for development purposes. Same rules as for app.image.tag apply! -->
<conf.image.tag>${app.image.tag}</conf.image.tag>
<!-- Additional tags. Ignored by default (empty), used by maintenance action. -->
<conf.image.tag.1></conf.image.tag.1>
<conf.image.tag.2></conf.image.tag.2>
<conf.image.flavor>noble</conf.image.flavor>
<conf.image.base>ubuntu:${conf.image.flavor}</conf.image.base>
<conf.skipBuild>false</conf.skipBuild>
Expand Down Expand Up @@ -1200,6 +1206,10 @@
<!-- Workaround for fabric8io/docker-maven-plugin#1865 -->
<APP_IMAGE_VERSION>${app.image.version}</APP_IMAGE_VERSION>
</args>
<tags>
<tag>${app.image.tag.1}</tag>
<tag>${app.image.tag.2}</tag>
</tags>
<filter>@</filter>
<assembly>
<descriptor>assembly.xml</descriptor>
Expand Down Expand Up @@ -1235,6 +1245,10 @@
<!-- Workaround for fabric8io/docker-maven-plugin#1865 -->
<APP_IMAGE_VERSION>${app.image.version}</APP_IMAGE_VERSION>
</args>
<tags>
<tag>${conf.image.tag.1}</tag>
<tag>${conf.image.tag.2}</tag>
</tags>
<filter>@</filter>
<assembly>
<descriptor>${project.basedir}/modules/container-configbaker/assembly.xml</descriptor>
Expand Down
102 changes: 95 additions & 7 deletions src/backports/v6.6/002-pom.xml.patch
Original file line number Diff line number Diff line change
@@ -1,11 +1,21 @@
--- a/pom.xml (revision 906f874f9fd56241c41e6c2c2f6989c4406f5909)
+++ b/pom.xml (date 1746655334773)
@@ -997,14 +997,18 @@
--- a/pom.xml
+++ b/pom.xml
@@ -1069,18 +1069,38 @@
<postgresql.server.version>17</postgresql.server.version>

<app.image>gdcc/dataverse:${app.image.tag}</app.image>
+ <!--
+ Note: We are still using the unstable tag here, as we need it most for development purposes.
+ It will be overridden by the maintenance CI for released app versions.
+ Note: During maintenance we will use the app.image.version setting from the DV parent POM.
+ -->
<app.image.tag>unstable</app.image.tag>
+ <!-- Additional tags. Ignored by default (empty), used by maintenance action. -->
+ <app.image.tag.1></app.image.tag.1>
+ <app.image.tag.2></app.image.tag.2>
+ <app.skipBuild>false</app.skipBuild>
<app.skipDeploy>false</app.skipDeploy>
+
<base.image>gdcc/base:${base.image.tag}</base.image>
<!-- Flavor is a release from a Linux distro, such as Ubuntu -->
<base.image.flavor>noble</base.image.flavor>
Expand All @@ -14,13 +24,43 @@
+ <base.image.tag>${base.image.version}-${base.image.flavor}${base.image.tag.suffix}</base.image.tag>
+ <!-- Suffix is defaulting to use the image with a specific Payara and Java version for development purpose -->
+ <base.image.tag.suffix>-p${payara.version}-j${target.java.version}</base.image.tag.suffix>
+
<conf.image>gdcc/configbaker:${conf.image.tag}</conf.image>
+ <!-- By default, we use the same tag as the app image for development purposes. Same rules as for app.image.tag apply! -->
<conf.image.tag>${app.image.tag}</conf.image.tag>
-
+ <!-- Additional tags. Ignored by default (empty), used by maintenance action. -->
+ <conf.image.tag.1></conf.image.tag.1>
+ <conf.image.tag.2></conf.image.tag.2>
+ <conf.image.flavor>alpine</conf.image.flavor>
+ <conf.image.base>alpine:3.18</conf.image.base>
+ <conf.skipBuild>false</conf.skipBuild>
+
<docker.platforms></docker.platforms>

@@ -1046,6 +1050,9 @@
-
+
<!-- Variables as used in docker-compose.yml -->
<APP_IMAGE>${app.image}</APP_IMAGE>
<POSTGRES_VERSION>${postgresql.server.version}</POSTGRES_VERSION>
@@ -1088,7 +1108,7 @@
<DATAVERSE_DB_USER>dataverse</DATAVERSE_DB_USER>
<SKIP_DEPLOY>${app.skipDeploy}</SKIP_DEPLOY>
</properties>
-
+
<build>
<plugins>
<!-- Build the exploded WAR target directory -->
@@ -1106,7 +1126,7 @@
<configuration>
</configuration>
</plugin>
-
+
<!-- Build image via Docker Maven Plugin -->
<plugin>
<groupId>io.fabric8</groupId>
@@ -1119,6 +1139,9 @@
<alias>dev_dataverse</alias>
<name>${app.image}</name>
<build>
Expand All @@ -30,7 +70,34 @@
<buildx>
<platforms>
<platform>${docker.platforms}</platform>
@@ -1075,6 +1082,9 @@
@@ -1128,26 +1151,33 @@
<args>
<BASE_IMAGE>${base.image}</BASE_IMAGE>
</args>
+ <tags>
+ <tag>${app.image.tag.1}</tag>
+ <tag>${app.image.tag.2}</tag>
+ </tags>
<filter>@</filter>
<assembly>
<descriptor>assembly.xml</descriptor>
</assembly>
</build>
-
+
<run>
</run>
-
+
<external>
<type>compose</type>
<basedir>${project.basedir}</basedir>
<composeFile>docker-compose-dev.yml</composeFile>
</external>
</image>
-
+
<image>
<alias>dev_bootstrap</alias>
<name>${conf.image}</name>
<build>
Expand All @@ -40,3 +107,24 @@
<buildx>
<platforms>
<platform>${docker.platforms}</platform>
@@ -1155,14 +1185,19 @@
</buildx>
<dockerFile>${project.basedir}/modules/container-configbaker/Dockerfile</dockerFile>
<args>
+ <BASE_IMAGE>${conf.image.base}</BASE_IMAGE>
<SOLR_VERSION>${SOLR_VERSION}</SOLR_VERSION>
</args>
+ <tags>
+ <tag>${conf.image.tag.1}</tag>
+ <tag>${conf.image.tag.2}</tag>
+ </tags>
<filter>@</filter>
<assembly>
<descriptor>${project.basedir}/modules/container-configbaker/assembly.xml</descriptor>
</assembly>
</build>
-
+
<!--
We skip the run here as it is already included in the external run config
above for the main image via the docker-compose file. Even if using
44 changes: 44 additions & 0 deletions src/backports/v6.7.1/001-pom.xml.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
--- a/pom.xml
+++ b/pom.xml
@@ -1119,6 +1119,9 @@
Note: During maintenance we will use the app.image.version setting from the DV parent POM.
-->
<app.image.tag>unstable</app.image.tag>
+ <!-- Additional tags. Ignored by default (empty), used by maintenance action. -->
+ <app.image.tag.1></app.image.tag.1>
+ <app.image.tag.2></app.image.tag.2>
<app.skipBuild>false</app.skipBuild>
<app.skipDeploy>false</app.skipDeploy>

@@ -1133,6 +1136,9 @@
<conf.image>gdcc/configbaker:${conf.image.tag}</conf.image>
<!-- By default, we use the same tag as the app image for development purposes. Same rules as for app.image.tag apply! -->
<conf.image.tag>${app.image.tag}</conf.image.tag>
+ <!-- Additional tags. Ignored by default (empty), used by maintenance action. -->
+ <conf.image.tag.1></conf.image.tag.1>
+ <conf.image.tag.2></conf.image.tag.2>
<conf.image.flavor>noble</conf.image.flavor>
<conf.image.base>ubuntu:${conf.image.flavor}</conf.image.base>
<conf.skipBuild>false</conf.skipBuild>
@@ -1191,6 +1197,10 @@
<!-- Workaround for fabric8io/docker-maven-plugin#1865 -->
<APP_IMAGE_VERSION>${app.image.version}</APP_IMAGE_VERSION>
</args>
+ <tags>
+ <tag>${app.image.tag.1}</tag>
+ <tag>${app.image.tag.2}</tag>
+ </tags>
<filter>@</filter>
<assembly>
<descriptor>assembly.xml</descriptor>
@@ -1226,6 +1236,10 @@
<!-- Workaround for fabric8io/docker-maven-plugin#1865 -->
<APP_IMAGE_VERSION>${app.image.version}</APP_IMAGE_VERSION>
</args>
+ <tags>
+ <tag>${conf.image.tag.1}</tag>
+ <tag>${conf.image.tag.2}</tag>
+ </tags>
<filter>@</filter>
<assembly>
<descriptor>${project.basedir}/modules/container-configbaker/assembly.xml</descriptor>
Loading