Skip to content

Commit

Permalink
style,ci(ct): add some more verbosity about progress in maintenance job
Browse files Browse the repository at this point in the history
  • Loading branch information
poikilotherm committed Sep 19, 2024
1 parent dcc3a6a commit 4b652a6
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/scripts/maintenance-job.sh
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,9 @@ for BRANCH in "$@"; do
cd "$MAINTENANCE_WORKSPACE/$BRANCH"

# 2. Now let's apply the patches (we have them checked out in $GITHUB_WORKSPACE, not necessarily in this local checkout)
echo "Checking for patches..."
if [[ -d ${GITHUB_WORKSPACE}/modules/container-base/src/backports/$BRANCH ]]; then
echo "Applying patches now."
find "${GITHUB_WORKSPACE}/modules/container-base/src/backports/$BRANCH" -type f -name '*.patch' -print0 | xargs -0 -n1 patch -p1 -s -i
fi

Expand All @@ -82,16 +84,19 @@ for BRANCH in "$@"; do
else
BASE_IMAGE_REF=$( mvn initialize help:evaluate -Pct -f modules/container-base -Dexpression=base.image -Dbase.image.tag.suffix="" -q -DforceStdout )
fi
echo "Determined BASE_IMAGE_REF=$BASE_IMAGE_REF from Maven"

# 4. Check for Temurin image updates
JAVA_IMAGE_REF=$( mvn help:evaluate -Pct -f modules/container-base -Dexpression=java.image -q -DforceStdout )
echo "Determined JAVA_IMAGE_REF=$JAVA_IMAGE_REF from Maven"
NEWER_JAVA_IMAGE=0
if check_newer_parent "$JAVA_IMAGE_REF" "$BASE_IMAGE_REF"; then
NEWER_JAVA_IMAGE=1
fi

# 5. Check for package updates in base image
PKGS="$( grep "ARG PKGS" modules/container-base/src/main/docker/Dockerfile | cut -f2 -d= | tr -d '"' )"
echo "Determined installed packages=\"$PKGS\" from Maven"
NEWER_PKGS=0
# Don't bother with package checks if the java image is newer already
if ! (( NEWER_JAVA_IMAGE )); then
Expand Down

0 comments on commit 4b652a6

Please sign in to comment.