Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
66 commits
Select commit Hold shift + click to select a range
db7b27b
ci(ct): move CI container scripts to separate directory
poikilotherm Apr 30, 2025
b73131f
ci(ct): fix newer parent function repo extraction
poikilotherm May 8, 2025
cdc8b44
refactor(ci,ct): move base image maintenance script to other name
poikilotherm May 8, 2025
6c62a18
doc(ci,ct): add description of base image maintenance job outputs wit…
poikilotherm May 8, 2025
5649773
refactor(ci,ct): rename base image maintenance job
poikilotherm May 8, 2025
3636fb1
build(ct): add Maven options to skip building app or configbaker image
poikilotherm May 8, 2025
3ae2100
build(ct): add an app image version Maven property
poikilotherm May 8, 2025
c6ee2f5
build(ct): split the base image reference
poikilotherm May 8, 2025
850bfc0
build(ct): add backports of Maven properties for past releases
poikilotherm May 8, 2025
2fec562
ci(ct): add dry run option to base image maintenance script
poikilotherm May 8, 2025
34cf2f5
ci(ct): move branch discovery to separate job
poikilotherm May 8, 2025
be2063d
ci(ct): temporarily cut the CI jobs loose for testing purposes
poikilotherm May 8, 2025
87be0cb
ci(ct): add output when base image maintenance script runs in dry-run…
poikilotherm May 8, 2025
2f4fbd3
ci(ct): rename output for base-image maintenance job as context is in…
poikilotherm May 8, 2025
95215ea
ci(ct): add application image maintenance job
poikilotherm May 8, 2025
b27b4b1
ci(ct): add damp-run mode to maintenance scripts
poikilotherm May 8, 2025
5918bd3
ci(ct): fix app image maintenance script missing base image tag
poikilotherm May 8, 2025
c6001c4
ci(ct): add input options for dry and damp runs in maintenance workflow
poikilotherm May 8, 2025
f1da695
ci(ct): print the container readme to the logs for debugging purposes…
poikilotherm May 8, 2025
fc4b2a7
ci(ct): fix maintenance scripts to make the patch command ignore whit…
poikilotherm May 8, 2025
30bbcd2
ci: no longer run Maven test for master or tags
poikilotherm May 8, 2025
137a06b
ci(ct): run the maintenance workflow for new releases, too
poikilotherm May 8, 2025
a638dba
ci(ct): simplify the base image push workflow
poikilotherm May 8, 2025
26af686
ci(ct): simplify the app image push workflow
poikilotherm May 8, 2025
7da0361
ci(ct): fix app image workflow for external PRs
poikilotherm May 8, 2025
bcf9a9d
doc(ct): adapt app image README for Hub to new tag policy
poikilotherm May 8, 2025
6c3e60b
ci(ct): add hub description deployment steps to maintenance workflow
poikilotherm May 8, 2025
5aedb1a
doc(ct): fix obsolete sentence from base image hub description
poikilotherm May 8, 2025
a9e4a88
ci(ct): remove superfluous MASTER_BRANCH_TAG from app push workflow
poikilotherm May 9, 2025
659a977
build(ct): enhance app image labels with base image reference and cor…
poikilotherm May 9, 2025
85d2f04
docs(ct): add and extend supported image tags and add version string …
poikilotherm May 9, 2025
bb4f711
chore(ct): upgrade configbaker to Alpine 3.21 and pin down dependencies
poikilotherm May 15, 2025
213e28d
doc: introduce CODEOWNERS
poikilotherm May 15, 2025
f71542b
feat: add Renovate config
poikilotherm May 15, 2025
b15681c
test(ct): check if Renovatebot correctly identifies APK updates
poikilotherm May 15, 2025
7e8969b
build(ct): move configbaker to Ubuntu 24.04 LTS
poikilotherm May 16, 2025
5762cdf
chore(renovate): improve Renovate config for better package grouping …
poikilotherm May 16, 2025
1a3395b
test(ct): downgrade wait4x to test renovate detection
poikilotherm May 16, 2025
d04311f
chore: disable Renovate managers for Maven and Dockerfiles
poikilotherm May 16, 2025
4c4d98c
ci(docs): update Sphinx workflow to use `sphinx-notes/pages` action
poikilotherm Jun 2, 2025
b6a429e
ci(ct): add Trivy scan utility for checking OS vulnerability fixes
poikilotherm Jun 2, 2025
328bee3
chore,ci(ct): update Renovate schedule to use cron syntax
poikilotherm Jun 2, 2025
795a9cb
feat(ct): set configurable base image for configbaker
poikilotherm Jun 2, 2025
3b41d84
feat(ct): add backports for container-configbaker to support image cu…
poikilotherm Jun 2, 2025
11781b0
ci(ct): add ConfigBaker image maintenance workflow and script
poikilotherm Jun 2, 2025
070b62a
doc,ci(ct): enable ConfigBaker image DockerHub description maintenance
poikilotherm Jun 2, 2025
f747c74
docs(ct): improve configbaker image documentation with tagging details
poikilotherm Jun 2, 2025
3beee29
style(ct): use app.image.version for configbaker OCI metadata tags
poikilotherm Jun 2, 2025
6ac8d31
update docker tagging docs #10618
pdurbin Jun 2, 2025
2f4244a
docs(ct): simplify headings in container image guides
poikilotherm Jun 3, 2025
21e0440
docs(ct): standardize Sphinx anchor names for supported image tag ref…
poikilotherm Jun 3, 2025
0c66edf
docs(ct): remove Flexible Stack tag description from app-image guide
poikilotherm Jun 3, 2025
c9d3fef
chore(pom): bump fabric8-dmp version to 0.46.0
poikilotherm Jun 3, 2025
c7b16bd
style(ct): remove duplicate heading in ConfigBaker README
poikilotherm Jun 3, 2025
7708149
docs(ct): add release notes for container image versioning improvements
poikilotherm Jun 3, 2025
b70b92b
chore(ct): update demo compose and docs to use `latest` image tags
poikilotherm Jun 3, 2025
5bbfb05
ci(ct): add explicit read permissions for contents and packages in im…
poikilotherm Jun 3, 2025
4de642e
let doc writers know to pip install new requirements #10618
pdurbin Jun 4, 2025
ae03e73
improve release note #10618
pdurbin Jun 4, 2025
df7c196
make use of "version" string in "making releases" doc #10618
pdurbin Jun 4, 2025
20c8696
various tweaks to docs #10618
pdurbin Jun 4, 2025
968e89e
typo #10618
pdurbin Jun 4, 2025
8b971a8
mention alpha tag is going away #10618
pdurbin Jun 4, 2025
095b70e
clarify
pdurbin Jun 4, 2025
388c55f
ci(ct): re-enable conditional workflows in upstream repository
poikilotherm Jun 4, 2025
fafd871
docs(ct): add README for backports directory and usage guidelines
poikilotherm Jun 4, 2025
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
8 changes: 8 additions & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@

# Any container related stuff should be assigned to / reviewed by Oliver and/or Phil
modules/container-configbaker/** @poikilotherm @pdurbin
modules/container-base/** @poikilotherm @pdurbin
src/main/docker/** @poikilotherm @pdurbin
docker-compose-dev.yml @poikilotherm @pdurbin
.github/workflows/scripts/containers** @poikilotherm @pdurbin
.github/workflows/container_* @poikilotherm @pdurbin
9 changes: 4 additions & 5 deletions .github/workflows/container_app_pr.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
---
name: Preview Application Container Image

# TODO: merge this workflow into the existing container_app_push.yaml flow - there's not much difference!

on:
# We only run the push commands if we are asked to by an issue comment with the correct command.
# This workflow is always taken from the default branch and runs in repo context with access to secrets.
repository_dispatch:
types: [ push-image-command ]

env:
IMAGE_TAG: unstable
BASE_IMAGE_TAG: unstable
PLATFORMS: "linux/amd64,linux/arm64"

jobs:
Expand Down Expand Up @@ -65,10 +65,9 @@ jobs:
install
- name: Deploy multi-arch application and configbaker container image
run: >
mvn
-Dapp.image.tag=${{ env.IMAGE_TAG }} -Dbase.image.tag=${{ env.BASE_IMAGE_TAG }}
mvn -Pct deploy
-Dapp.image.tag=${{ env.IMAGE_TAG }}
-Ddocker.registry=ghcr.io -Ddocker.platforms=${{ env.PLATFORMS }}
-Pct deploy

- uses: marocchino/sticky-pull-request-comment@v2
with:
Expand Down
44 changes: 9 additions & 35 deletions .github/workflows/container_app_push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ env:
IMAGE_TAG: unstable
REGISTRY: "" # Empty means default to Docker Hub
PLATFORMS: "linux/amd64,linux/arm64"
MASTER_BRANCH_TAG: alpha

jobs:
build:
Expand Down Expand Up @@ -60,30 +59,6 @@ jobs:

# TODO: add smoke / integration testing here (add "-Pct -DskipIntegrationTests=false")

hub-description:
needs: build
name: Push image descriptions to Docker Hub
# Run this when triggered via push or schedule as reused workflow from base / maven unit tests.
# Excluding PRs here means we will have no trouble with secrets access. Also avoid runs in forks.
if: ${{ github.event_name != 'pull_request' && github.ref_name == 'develop' && github.repository_owner == 'IQSS' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: peter-evans/dockerhub-description@v4
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
repository: gdcc/dataverse
short-description: "Dataverse Application Container Image providing the executable"
readme-filepath: ./src/main/docker/README.md
- uses: peter-evans/dockerhub-description@v4
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
repository: gdcc/configbaker
short-description: "Dataverse Config Baker Container Image providing setup tooling and more"
readme-filepath: ./modules/container-configbaker/README.md

# Note: Accessing, pushing tags etc. to DockerHub or GHCR will only succeed in upstream because secrets.
# We check for them here and subsequent jobs can rely on this to decide if they shall run.
check-secrets:
Expand All @@ -107,13 +82,13 @@ jobs:
needs: check-secrets
name: "Package & Publish"
runs-on: ubuntu-latest
# Only run this job if we have access to secrets. This is true for events like push/schedule which run in
# Only run this job if we have access to secrets. This is true for events like push/schedule which run in the
# context of the main repo, but for PRs only true if coming from the main repo! Forks have no secret access.
#
# Note: The team's decision was to not auto-deploy an image on any git push where no PR exists (yet).
# Accordingly, only run for push events on branches develop and master.
# Accordingly, only run for push events on the 'develop' branch.
if: needs.check-secrets.outputs.available == 'true' &&
( github.event_name != 'push' || ( github.event_name == 'push' && contains(fromJSON('["develop", "master"]'), github.ref_name)))
( github.event_name != 'push' || ( github.event_name == 'push' && github.ref_name == 'develop' ))
steps:
- name: Checkout and Setup Maven
uses: IQSS/dataverse/.github/actions/setup-maven@develop
Expand Down Expand Up @@ -141,16 +116,15 @@ jobs:
- name: Set up QEMU for multi-arch builds
uses: docker/setup-qemu-action@v3

- name: Re-set image tag based on branch (if master)
if: ${{ github.ref_name == 'master' }}
- name: Add rolling image tag when pushing to develop
if: ${{ github.event_name == 'push' && github.ref_name == 'develop' }}
run: |
echo "IMAGE_TAG=${{ env.MASTER_BRANCH_TAG }}" >> $GITHUB_ENV
echo "BASE_IMAGE_TAG=${{ env.MASTER_BRANCH_TAG }}" >> $GITHUB_ENV
echo "ADDITIONAL_TAGS=-Ddocker.tags.upcoming=$( mvn initialize help:evaluate -Pct -Dexpression=app.image.tag -Dapp.image.tag='${app.image.version}-${base.image.flavor}' -q -DforceStdout )" | tee -a "$GITHUB_ENV"
- name: Re-set image tag and container registry when on PR
if: ${{ github.event_name == 'pull_request' }}
run: |
echo "IMAGE_TAG=$(echo "$GITHUB_HEAD_REF" | tr '\\/_:&+,;#*' '-')" >> $GITHUB_ENV
echo "REGISTRY='-Ddocker.registry=ghcr.io'" >> $GITHUB_ENV
echo "IMAGE_TAG=$(echo "$GITHUB_HEAD_REF" | tr '\\/_:&+,;#*' '-')" | tee -a "$GITHUB_ENV"
echo "REGISTRY='-Ddocker.registry=ghcr.io'" | tee -a "$GITHUB_ENV"

# Necessary to split as otherwise the submodules are not available (deploy skips install)
- name: Build app and configbaker container image with local architecture and submodules (profile will skip tests)
Expand All @@ -162,7 +136,7 @@ jobs:
- name: Deploy multi-arch application and configbaker container image
run: >
mvn
-Dapp.image.tag=${{ env.IMAGE_TAG }}
-Dapp.image.tag=${{ env.IMAGE_TAG }} ${{ env.ADDITIONAL_TAGS }}
$( [[ -n "${{ inputs.base-image-ref }}" ]] && echo "-Dbase.image=${{ inputs.base-image-ref }}" )
${{ env.REGISTRY }} -Ddocker.platforms=${{ env.PLATFORMS }}
-P ct deploy
Expand Down
41 changes: 11 additions & 30 deletions .github/workflows/container_base_push.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
---
name: Container Images Releasing
name: Base Container Image

on:
push:
tags:
- 'v[6-9].**'
branches:
- 'develop'
# "Path filters are not evaluated for pushes of tags" https://docs.github.com/en/actions/writing-workflows/workflow-syntax-for-github-actions#onpushpull_requestpull_request_targetpathspaths-ignore
Expand Down Expand Up @@ -33,7 +31,7 @@ jobs:
# Only run in upstream repo - avoid unnecessary runs in forks
if: ${{ github.repository_owner == 'IQSS' }}
outputs:
base-image-ref: ${{ steps.finalize.outputs.base-image-ref }}
base-image-ref: ${{ steps.determine-name.outputs.full-ref }}

steps:
- name: Checkout and Setup Maven
Expand All @@ -52,12 +50,10 @@ jobs:
# In case this is a push to develop, we care about buildtime.
# Configure a remote ARM64 build host in addition to the local AMD64 in two steps.
- name: Setup SSH agent
if: ${{ github.event_name != 'schedule' }}
uses: webfactory/ssh-agent@v0.9.1
with:
ssh-private-key: ${{ secrets.BUILDER_ARM64_SSH_PRIVATE_KEY }}
- name: Provide the known hosts key and the builder config
if: ${{ github.event_name != 'schedule' }}
run: |
echo "${{ secrets.BUILDER_ARM64_SSH_HOST_KEY }}" > ~/.ssh/known_hosts
mkdir -p modules/container-base/target/buildx-state/buildx/instances
Expand All @@ -81,40 +77,25 @@ jobs:

# Determine the base image name we are going to use from here on
- name: Determine base image name
id: determine-name
run: |
if [[ "${{ github.ref_name }}" = "${{ env.DEVELOPMENT_BRANCH }}" ]]; then
echo "BASE_IMAGE=$( mvn initialize help:evaluate -Pct -f modules/container-base -Dexpression=base.image -q -DforceStdout )" | tee -a "${GITHUB_ENV}"
echo "BASE_IMAGE_UPCOMING=$( mvn initialize help:evaluate -Pct -f modules/container-base -Dexpression=base.image -Dbase.image.tag.suffix="" -q -DforceStdout )" | tee -a "${GITHUB_ENV}"
else
echo "BASE_IMAGE=$( mvn initialize help:evaluate -Pct -f modules/container-base -Dexpression=base.image -Dbase.image.tag.suffix="" -q -DforceStdout )" | tee -a "${GITHUB_ENV}"
fi
- name: Calculate revision number for immutable tag (on release branches only)
if: ${{ github.ref_name != env.DEVELOPMENT_BRANCH }}
id: revision-tag
uses: ./.github/actions/get-image-revision
with:
image-ref: ${{ env.BASE_IMAGE }}
tag-options-prefix: "-Dbase.image.tag.suffix='' -Ddocker.tags.revision="
BASE_IMAGE=$( mvn initialize help:evaluate -Pct -f modules/container-base -Dexpression=base.image -q -DforceStdout )
BASE_IMAGE_UPCOMING=$( mvn initialize help:evaluate -Pct -f modules/container-base -Dexpression=base.image -Dbase.image.tag.suffix="" -q -DforceStdout )

echo "BASE_IMAGE=${BASE_IMAGE}" | tee -a "${GITHUB_ENV}"
echo "BASE_IMAGE_UPCOMING=${BASE_IMAGE_UPCOMING}" | tee -a "${GITHUB_ENV}"
echo "full-ref=${BASE_IMAGE_UPCOMING}" | tee -a "$GITHUB_OUTPUT"

- name: Configure update of "latest" tag for development branch
id: develop-tag
if: ${{ github.ref_name == env.DEVELOPMENT_BRANCH }}
run: |
echo "tag-options=-Ddocker.tags.develop=unstable -Ddocker.tags.upcoming=${BASE_IMAGE_UPCOMING#*:}" | tee -a "${GITHUB_OUTPUT}"

- name: Deploy multi-arch base container image to Docker Hub
id: build
run: |
mvn -f modules/container-base -Pct deploy -Ddocker.noCache -Ddocker.platforms=${{ env.PLATFORMS }} \
-Ddocker.imagePropertyConfiguration=override ${{ steps.develop-tag.outputs.tag-options }} ${{ steps.revision-tag.outputs.tag-options }}

- name: Determine appropriate base image ref for app image
id: finalize
run: |
if [[ "${{ github.ref_name }}" = "${{ env.DEVELOPMENT_BRANCH }}" ]]; then
echo "base-image-ref=${BASE_IMAGE_UPCOMING}" | tee -a "$GITHUB_OUTPUT"
else
echo "base-image-ref=gdcc/base:${{ steps.revision-tag.outputs.revision-tag }}" | tee -a "$GITHUB_OUTPUT"
fi
-Ddocker.imagePropertyConfiguration=override ${{ steps.develop-tag.outputs.tag-options }}

push-app-img:
name: "Rebase & Publish App Image"
Expand Down
Loading