Skip to content

Commit 26697ad

Browse files
committed
ops: update software versions for testing
Also update the actions configuration and add dependabot config.
1 parent fe1233b commit 26697ad

File tree

22 files changed

+86
-717
lines changed

22 files changed

+86
-717
lines changed

.github/dependabot.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
version: 2
3+
updates:
4+
5+
# Maintain dependencies for GitHub Actions
6+
- package-ecosystem: "github-actions"
7+
directory: "/"
8+
schedule:
9+
interval: "monthly"
10+
assignees:
11+
- "kerberizer"

.github/workflows/build.yml

Lines changed: 60 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,12 @@ name: Build the ambit-docker images
44
on: # yamllint disable-line rule:truthy
55
workflow_dispatch:
66
repository_dispatch:
7-
types: [ambit-repo-push]
7+
types:
8+
- ambit-repo-push
89
push:
910
branches:
1011
- master
12+
- ci-updates
1113

1214
jobs:
1315

@@ -21,7 +23,7 @@ jobs:
2123
steps:
2224

2325
- name: Checkout the repository
24-
uses: actions/checkout@v3
26+
uses: actions/checkout@v6.0.1
2527

2628
- name: Determining the RDBMS test matrix
2729
id: db
@@ -48,14 +50,15 @@ jobs:
4850
war_db="$( awk "${awk_get_war_from_db}" '${{ env.prefix }}/tags.txt')"
4951
echo "war-db=${war_db}" >> $GITHUB_OUTPUT
5052
53+
5154
build-ambit:
5255

5356
needs: [set-test-matrices]
5457
runs-on: ubuntu-latest
5558
strategy:
5659
matrix:
57-
java-distribution: ['temurin', 'zulu']
58-
java-version: [8, 11, 17]
60+
java-distribution: ['temurin', 'corretto']
61+
java-version: [8, 11, 17, 21, 25]
5962
rdbms-version: ${{ fromJson(needs.set-test-matrices.outputs.matrix-db) }}
6063
fail-fast: false
6164
env:
@@ -66,14 +69,14 @@ jobs:
6669
steps:
6770

6871
- name: Checkout the AMBIT repository
69-
uses: actions/checkout@v3
72+
uses: actions/checkout@v6.0.1
7073
with:
7174
repository: ideaconsult/ambit-mirror
7275
ref: ${{ github.event.client_payload.sha }}
7376
token: ${{ secrets.GH_R_PR }}
7477

7578
- name: 'Set up OpenJDK: ${{ matrix.java-distribution }}/${{ matrix.java-version }}'
76-
uses: actions/setup-java@v3
79+
uses: actions/setup-java@v5.1.0
7780
with:
7881
distribution: ${{ matrix.java-distribution }}
7982
java-version: ${{ matrix.java-version }}
@@ -91,7 +94,7 @@ jobs:
9194
ln -s -t /usr/bin "/opt/apache-maven-${maven_version}/bin/mvn"
9295
9396
- name: Cache the local Maven repository
94-
uses: actions/cache@v3
97+
uses: actions/cache@v4.3.0
9598
with:
9699
path: ~/.m2/repository
97100
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
@@ -184,14 +187,18 @@ jobs:
184187
run: docker stop "${rdbms_ctnr_name}"
185188

186189
- name: Save the newly build WAR
187-
# Only the one tested with the RDBMS marked with our "latest" image tag
188-
if: ${{ matrix.rdbms-version == needs.set-test-matrices.outputs.war-db }}
189-
uses: actions/upload-artifact@v3
190+
# Only the one tested with the RDBMS marked with our "latest" image tag,
191+
# and only for the Java distribution that we build our images with.
192+
if: >
193+
matrix.rdbms-version == needs.set-test-matrices.outputs.war-db &&
194+
matrix.java-distribution == 'temurin'
195+
uses: actions/upload-artifact@v5.0.0
190196
with:
191197
name: ambit-war-java${{ matrix.java-version }}
192198
path: ambit2-apps/ambit2-www/target/ambit2.war
193199
retention-days: 1
194200

201+
195202
set-build-matrices:
196203

197204
runs-on: ubuntu-latest
@@ -203,7 +210,7 @@ jobs:
203210
steps:
204211

205212
- name: Checkout the repository
206-
uses: actions/checkout@v3
213+
uses: actions/checkout@v6.0.1
207214

208215
- name: Determining the ambit-api build matrix
209216
id: api
@@ -225,6 +232,7 @@ jobs:
225232
jq . <<<"$matrix_json" # lint
226233
echo "matrix=${matrix_json}" >> $GITHUB_OUTPUT
227234
235+
228236
build-images-api:
229237

230238
needs: [build-ambit, set-build-matrices]
@@ -239,15 +247,15 @@ jobs:
239247
steps:
240248

241249
- name: Checkout the repository
242-
uses: actions/checkout@v3
250+
uses: actions/checkout@v6.0.1
243251

244252
- name: Identify the OpenJDK version
245253
run: |
246254
export java_version="$(echo ${{ matrix.ver }} | sed 's|.*-jdk\([[:digit:]]\+\)-.*|\1|')"
247255
echo "java_version=${java_version}" >>"$GITHUB_ENV"
248256
249257
- name: Load the latest WAR for the required OpenJDK version
250-
uses: actions/download-artifact@v3
258+
uses: actions/download-artifact@v6.0.0
251259
with:
252260
name: ambit-war-java${{ env.java_version }}
253261
path: ./ci/${{ env.image }}/${{ matrix.ver }}
@@ -264,29 +272,38 @@ jobs:
264272
echo "image_tags=${tags_list:1}" >>"$GITHUB_ENV"
265273
266274
- name: Set up Docker Buildx
267-
uses: docker/setup-buildx-action@v2
275+
uses: docker/setup-buildx-action@v3.11.1
268276

269277
- name: Log in to GitHub Container Registry
270-
uses: docker/login-action@v2
278+
uses: docker/login-action@v3.6.0
271279
with:
272280
registry: ghcr.io
273-
username: idea-docker
274-
password: ${{ secrets.GH_CR_FA }}
281+
username: ${{ github.actor }}
282+
password: ${{ secrets.GITHUB_TOKEN }}
275283

276284
- name: Log in to Docker Hub
277-
uses: docker/login-action@v2
285+
uses: docker/login-action@v3.6.0
278286
with:
279-
username: kerberizer
287+
username: ${{ secrets.DCKR_USER }}
280288
password: ${{ secrets.DCKR_TOKEN }}
281289

282290
- name: Build the ambit-api image
283-
uses: docker/build-push-action@v4
291+
uses: docker/build-push-action@v6.18.0
284292
with:
285293
context: ./ci/${{ env.image }}/${{ matrix.ver }}
294+
outputs: type=docker,dest=ambit-api.${{ matrix.ver }}.docker.tar
286295
pull: true
287296
push: ${{ github.ref == 'refs/heads/master' }} # push only if we're on the master branch
288297
tags: ${{ env.image_tags }}
289298

299+
- name: Upload the built image as artifact for download
300+
uses: actions/upload-artifact@v5.0.0
301+
with:
302+
name: ambit-api.${{ matrix.ver }}.docker.tar
303+
path: ambit-api.${{ matrix.ver }}.docker.tar
304+
retention-days: 3
305+
306+
290307
build-images-db:
291308

292309
needs: set-build-matrices
@@ -301,7 +318,7 @@ jobs:
301318
steps:
302319

303320
- name: Checkout the repository
304-
uses: actions/checkout@v3
321+
uses: actions/checkout@v6.0.1
305322

306323
- name: Determine the image tags
307324
run: >-
@@ -315,29 +332,38 @@ jobs:
315332
echo "image_tags=${tags_list:1}" >>"$GITHUB_ENV"
316333
317334
- name: Set up Docker Buildx
318-
uses: docker/setup-buildx-action@v2
335+
uses: docker/setup-buildx-action@v3.11.1
319336

320337
- name: Log in to GitHub Container Registry
321-
uses: docker/login-action@v2
338+
uses: docker/login-action@v3.6.0
322339
with:
323340
registry: ghcr.io
324-
username: idea-docker
325-
password: ${{ secrets.GH_CR_FA }}
341+
username: ${{ github.actor }}
342+
password: ${{ secrets.GITHUB_TOKEN }}
326343

327344
- name: Log in to Docker Hub
328-
uses: docker/login-action@v2
345+
uses: docker/login-action@v3.6.0
329346
with:
330-
username: kerberizer
347+
username: ${{ secrets.DCKR_USER }}
331348
password: ${{ secrets.DCKR_TOKEN }}
332349

333350
- name: Build the ambit-db image
334-
uses: docker/build-push-action@v4
351+
uses: docker/build-push-action@v6.18.0
335352
with:
336353
context: ./ci/${{ env.image }}/${{ matrix.ver }}
354+
outputs: type=docker,dest=ambit-db.${{ matrix.ver }}.docker.tar
337355
pull: true
338356
push: ${{ github.ref == 'refs/heads/master' }} # push only if we're on the master branch
339357
tags: ${{ env.image_tags }}
340358

359+
- name: Upload the built image as artifact for download
360+
uses: actions/upload-artifact@v5.0.0
361+
with:
362+
name: ambit-db.${{ matrix.ver }}.docker.tar
363+
path: ambit-db.${{ matrix.ver }}.docker.tar
364+
retention-days: 3
365+
366+
341367
integration-testing:
342368

343369
needs: [build-images-api, build-images-db]
@@ -346,12 +372,12 @@ jobs:
346372
steps:
347373

348374
- name: Checkout the repository
349-
uses: actions/checkout@v3
375+
uses: actions/checkout@v6.0.1
350376

351-
- name: Spin up a default docker-compose setup
377+
- name: Spin up a default Docker Compose setup
352378
run: |
353-
docker-compose pull
354-
docker-compose up --detach
379+
docker compose pull
380+
docker compose up --detach
355381
356382
- name: Wait for the API to become operational
357383
run: |
@@ -363,8 +389,8 @@ jobs:
363389
- name: Run the API tests
364390
run: ./ci/run_integration_tests.sh
365391

366-
- name: Bring down the docker-compose setup
367-
run: docker-compose down --volumes
392+
- name: Bring down the Docker Compose setup
393+
run: docker compose down --volumes
368394

369395
# FIXME: Temporarily not sending notifications to Discord until we manage to send the final status.
370396
# send-notifications:

README.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,9 +99,12 @@ ambit-db | [ci/ambit-db/tags.txt](https://github.com/ideaconsult/ambit-docker/b
9999

100100
## Notes on specific versions
101101

102-
* Java 11 and 17 are supported, but for maximum stability we still recommend Java 8 as the most thoroughly tested platform.
103-
* MySQL 8+ is *not* supported. We may add support for it in the future, but for the time being please use MariaDB instead.
104-
* Tomcat 10 is *not* supported and most likely will never be supported. We plan to transition to [Quarkus](https://quarkus.io/).
102+
* Java LTS versions up to and including 25 should work, of which Java 8 remains the most thoroughly tested platform.
103+
* There are many Java binary builds. We test [Eclispe Temurin](https://adoptium.net/), which is used in our Docker images, and [Amazon Corretto](https://aws.amazon.com/corretto/).
104+
* MySQL is *not* supported. If your organization requires such support, please contact us at `support@ideaconsult.net`.
105+
* MariaDB 11+ is *not yet* supported, but will be. Currently supported are the 10.x LTS versions.
106+
* For both Java and MariaDB we test only LTS releases that are still supported, e.g. Java 22 or MariaDB 10.5 are not tested.
107+
* Tomcat 10+ is *not* supported and most likely will never be supported. We plan to transition to [Quarkus](https://quarkus.io/).
105108

106109
# Troubleshooting
107110
* If you hit the Docker Hub pull limits, use [GitHub Container Registry](https://github.com/orgs/ideaconsult/packages). You'll need to edit the docker compose files and prepend the `image` settings with `ghcr.io/`, e.g. `ideaconsult/ambit-db:latest` becomes `ghcr.io/ideaconsult/ambit-db:latest`.

ci/ambit-api/tags.txt

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1+
tomcat9-jdk25-temurin tomcat9-jdk25 jdk25
2+
tomcat9-jdk21-temurin tomcat9-jdk21 jdk21
13
tomcat9-jdk17-temurin tomcat9-jdk17 jdk17
24
tomcat9-jdk11-temurin tomcat9-jdk11 jdk11
35
tomcat9-jdk8-temurin tomcat9-jdk8 tomcat9 jdk8 latest
4-
tomcat8.5-jdk17-temurin tomcat8.5-jdk17
5-
tomcat8.5-jdk11-temurin tomcat8.5-jdk11
6-
tomcat8.5-jdk8-temurin tomcat8.5-jdk8 tomcat8.5

ci/ambit-api/tomcat8.5-jdk17-temurin/Dockerfile

Lines changed: 0 additions & 13 deletions
This file was deleted.

ci/ambit-api/tomcat8.5-jdk8-temurin/docker-entrypoint.sh

Lines changed: 0 additions & 75 deletions
This file was deleted.

ci/ambit-api/tomcat8.5-jdk8-temurin/Dockerfile renamed to ci/ambit-api/tomcat9-jdk21-temurin/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM tomcat:8.5-jdk8-temurin
1+
FROM tomcat:9-jdk21-temurin
22

33
ENV AMBIT_CONFIG_OVERRIDE_DIR /opt/ambit/config_override
44

ci/ambit-api/tomcat8.5-jdk11-temurin/docker-entrypoint.sh renamed to ci/ambit-api/tomcat9-jdk21-temurin/docker-entrypoint.sh

File renamed without changes.

ci/ambit-api/tomcat8.5-jdk11-temurin/Dockerfile renamed to ci/ambit-api/tomcat9-jdk25-temurin/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM tomcat:8.5-jdk11-temurin
1+
FROM tomcat:9-jdk25-temurin
22

33
ENV AMBIT_CONFIG_OVERRIDE_DIR /opt/ambit/config_override
44

ci/ambit-api/tomcat8.5-jdk17-temurin/docker-entrypoint.sh renamed to ci/ambit-api/tomcat9-jdk25-temurin/docker-entrypoint.sh

File renamed without changes.

0 commit comments

Comments
 (0)