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 d7e4a05
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 28 deletions.
12 changes: 0 additions & 12 deletions .github/workflows/container_base_push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -132,15 +132,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
49 changes: 40 additions & 9 deletions .github/workflows/container_maintenance.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,12 +87,43 @@ 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_tags_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
ed -s "./modules/container-base/README.md" << EOF
/--BEGIN_TAG_BLOCK--/+,/--END_TAG_BLOCK--/-d
/--BEGIN_TAG_BLOCK--/a
$( cat "${GITHUB_WORKSPACE}/tags.md" )
.
wq
EOF
- 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
20 changes: 13 additions & 7 deletions modules/container-base/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,17 +31,23 @@ 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.

--BEGIN_TAG_BLOCK--
--END_TAG_BLOCK--

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 d7e4a05

Please sign in to comment.