Skip to content

Commit

Permalink
ci(ct): make the maintenance workflow push the hub description for th…
Browse files Browse the repository at this point in the history
…e base image #10478
  • Loading branch information
poikilotherm committed Sep 19, 2024
1 parent feeb126 commit 1301020
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 28 deletions.
13 changes: 1 addition & 12 deletions .github/workflows/container_base_push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ on:
paths:
- 'modules/container-base/**'
- '!modules/container-base/src/backports/**'
- '!modules/container-base/README.md'
- 'modules/dataverse-parent/pom.xml'
- '.github/workflows/container_base_push.yml'

Expand Down Expand Up @@ -132,15 +133,3 @@ jobs:
uses: ./.github/workflows/container_app_push.yml
with:
base-image-ref: ${{ needs.build.outputs.base-image-ref }}


# TODO: job to update the docker hub description with supported tags and all
#- if: ${{ github.event_name == 'push' && github.ref_name == env.DEVELOPMENT_BRANCH }}
# name: Push description to DockerHub
# uses: peter-evans/dockerhub-description@v3
# with:
# username: ${{ secrets.DOCKERHUB_USERNAME }}
# password: ${{ secrets.DOCKERHUB_TOKEN }}
# repository: gdcc/base
# short-description: "Dataverse Base Container image providing Payara application server and optimized configuration"
# readme-filepath: ./modules/container-base/README.md
41 changes: 32 additions & 9 deletions .github/workflows/container_maintenance.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,12 +87,35 @@ jobs:
# with:
# branch: ${{ matrix.branch }}

# TODO: job to update the docker hub description with supported tags and all
# - name: Push description to DockerHub
# uses: peter-evans/dockerhub-description@v3
# with:
# username: ${{ secrets.DOCKERHUB_USERNAME }}
# password: ${{ secrets.DOCKERHUB_TOKEN }}
# repository: gdcc/base
# short-description: "Dataverse Base Container image providing Payara application server and optimized configuration"
# readme-filepath: ./modules/container-base/README.md
hub-description:
name: Push description to DockerHub
runs-on: ubuntu-latest
permissions:
contents: read
packages: read
needs: build
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Render README
id: render
run: |
TAGS_JSON='${{ needs.build.outputs.supported_tag_matrix }}'
echo "$TAGS_JSON" | jq -r 'keys | sort | reverse | .[]' |
while IFS= read -r branch; do
echo \
"- \`$( echo "$TAGS_JSON" | jq --arg v "$branch" -r '.[$v] | join("`, `")' )\`" \
"([Dockerfile](https://github.com/IQSS/dataverse/blob/${branch}/modules/container-base/src/main/docker/Dockerfile)," \
"[Patches](https://github.com/IQSS/dataverse/blob/develop/modules/container-base/src/backports/${branch}))" \
| tee -a "${GITHUB_WORKSPACE}/tags.md"
done
sed -i -e "/<\!-- TAG BLOCK HERE -->/r ${GITHUB_WORKSPACE}/tags.md" "./modules/container-base/README.md"
- name: Push description to DockerHub
uses: peter-evans/dockerhub-description@v4
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
repository: gdcc/base
short-description: "Dataverse Base Container image providing Payara application server and optimized configuration"
readme-filepath: ./modules/container-base/README.md
19 changes: 12 additions & 7 deletions modules/container-base/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,17 +31,22 @@ to ask for help and guidance.
## Supported Image Tags

This image is sourced within the main upstream code [repository of the Dataverse software](https://github.com/IQSS/dataverse).
Development and maintenance of the [image's code](https://github.com/IQSS/dataverse/tree/develop/modules/container-base)
happens there (again, by the community). Community-supported image tags are based on the two most important branches:
Development and maintenance of the [image's code](https://github.com/IQSS/dataverse/tree/develop/modules/container-base) happens there (again, by the community).
Community-supported image tags are based on the two most important branches:

- The `unstable` tag corresponds to the `develop` branch, where pull requests are merged.
([`Dockerfile`](https://github.com/IQSS/dataverse/tree/develop/modules/container-base/src/main/docker/Dockerfile))
- The `alpha` tag corresponds to the `master` branch, where releases are cut from.
([`Dockerfile`](https://github.com/IQSS/dataverse/tree/master/modules/container-base/src/main/docker/Dockerfile))
Our tagging is inspired by [Bitnami](https://docs.vmware.com/en/VMware-Tanzu-Application-Catalog/services/tutorials/GUID-understand-rolling-tags-containers-index.html>).
For more detailed information about our tagging policy, please read about our [base image tags](https://guides.dataverse.org/en/latest/container/base-image.html#supported-image-tags) in the Dataverse Containers Guide.

For ease of use, here is a list of images that are currently maintained.

<!-- TAG BLOCK HERE -->

All of them are rolling tags, except those ending with `-r<number>`, which are immutable tags.
The `unstable` tags are the current development branch snapshot.

Within the main repository, you may find the base image files at `<git root>/modules/container-base`.
This Maven module uses the [Maven Docker Plugin](https://dmp.fabric8.io) to build and ship the image.
You may use, extend, or alter this image to your liking and/or host in some different registry if you want to.
You may use, extend, or alter this image to your liking and/or host in some different registry if you want to under the terms of the Apache 2.0 license.

**Supported architectures:** This image is created as a "multi-arch image", supporting the most common architectures
Dataverse usually runs on: AMD64 (Windows/Linux/...) and ARM64 (Apple M1/M2).
Expand Down

0 comments on commit 1301020

Please sign in to comment.