From aadde4214ef9fb97cbf580f40b99e1a9f0ea71c3 Mon Sep 17 00:00:00 2001 From: Leo Christy Jesuraj Date: Thu, 19 Oct 2023 11:42:17 -0400 Subject: [PATCH 1/9] List 23.0.0.10 images (#554) --- docs/icr-images.md | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/docs/icr-images.md b/docs/icr-images.md index ac8cc297..4bb05b1e 100644 --- a/docs/icr-images.md +++ b/docs/icr-images.md @@ -1,9 +1,9 @@ # IBM Container Registry (ICR) -WebSphere Liberty container images are available from IBM Container Registry (ICR) at `icr.io/appcafe/websphere-liberty`. Our recommendation is to use ICR instead of Docker Hub, since ICR doesn't impose rate limits on image pulls. Images can be pulled from ICR without authentication. Only images with Universal Base Image (UBI) as the Operating System are available in ICR at the moment. +WebSphere Liberty container images are available from the IBM Container Registry (ICR) at `icr.io/appcafe/websphere-liberty`. Our recommendation is to use ICR instead of Docker Hub since ICR doesn't impose rate limits on image pulls. Images can be pulled from ICR without authentication. Only images with Universal Base Image (UBI) as the Operating System are available in ICR. -The images for the latest release and the last two quarterly releases are available and are refreshed regularly. +The images for the latest Liberty release and the last two quarterly releases (versions ending in _.3_, _.6_, _.9_ and _.12_) are available and are refreshed regularly to include fixes for the operating system (OS) and Java. Available image tags are listed below. The tags follow this naming convention: ``` @@ -22,7 +22,7 @@ ibmcloud cr images --restrict appcafe/websphere-liberty ``` -## Latest version +## Latest version (23.0.0.10) ``` kernel-java8-openj9-ubi @@ -36,6 +36,20 @@ full-java11-openj9-ubi full-java17-openj9-ubi ``` +## 23.0.0.10 + +``` +23.0.0.10-kernel-java8-openj9-ubi +23.0.0.10-kernel-java8-ibmjava-ubi +23.0.0.10-kernel-java11-openj9-ubi +23.0.0.10-kernel-java17-openj9-ubi + +23.0.0.10-full-java8-openj9-ubi +23.0.0.10-full-java8-ibmjava-ubi +23.0.0.10-full-java11-openj9-ubi +23.0.0.10-full-java17-openj9-ubi +``` + ## 23.0.0.9 ``` From 5a2ada32a6abfc351bd13396135b7050ea916378 Mon Sep 17 00:00:00 2001 From: Wendy Raschke Date: Fri, 27 Oct 2023 11:25:45 -0500 Subject: [PATCH 2/9] Introduce GitHub Actions workflow YML, script for automating monthly release tasks --- .../workflows/update_files_for_release.yml | 61 +++++++++++++++++ update.sh | 67 +++++++++++++++++++ 2 files changed, 128 insertions(+) create mode 100644 .github/workflows/update_files_for_release.yml create mode 100644 update.sh diff --git a/.github/workflows/update_files_for_release.yml b/.github/workflows/update_files_for_release.yml new file mode 100644 index 00000000..11301294 --- /dev/null +++ b/.github/workflows/update_files_for_release.yml @@ -0,0 +1,61 @@ +# This workflow is triggered by manual inputs. + +name: Update files for the new release + +on: + workflow_dispatch: + inputs: + OLD_VERSION: + description: 'Enter old version' + # Show defaults as examples so user enters correct format. + default: '23.0.0.11' + required: true + type: string + NEW_VERSION: + description: 'Enter new version' + default: '23.0.0.12' + required: true + type: string + BUILD_LABEL: + description: 'Enter build label of release driver' + default: 'replace_with_gm_driver_label' + required: false + type: string + +jobs: + automate_release_updates: + runs-on: ubuntu-latest + + steps: + - name: Show useful information about the environment + run: echo "🔎 The name of the branch is ${{ github.ref }} and repository is ${{ github.repository }}." + + - name: Check out repository code + uses: actions/checkout@v4 + with: + ref: vNext + repository: wraschke/ci.docker + + - run: echo "💡 The ${{ github.repository }} repository has been cloned to the runner." + + - name: Run update.sh script + run: bash ./update.sh ${{ inputs.OLD_VERSION }} ${{ inputs.NEW_VERSION }} ${{ inputs.BUILD_LABEL }} + + - name: Commit changes + uses: EndBug/add-and-commit@v9 + with: + default_author: github_actions + author_name: GitHub Actions + message: "Updates for the release of ${{ inputs.NEW_VERSION }}" + add: '${{ github.workspace }}/ga/*' + new_branch: "${{ inputs.NEW_VERSION }}-release" + push: true + tag_push: '--force' + + - name: Create Pull Request + run: | + gh pr create -B vNext -H "${{ inputs.NEW_VERSION }}-release" -r mbroz2 -r leochr --title "Updates for the release of ${{ inputs.NEW_VERSION }}" --body "Created by Github Actions" + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - run: echo "🍏 This job's status is ${{ job.status }}." \ No newline at end of file diff --git a/update.sh b/update.sh new file mode 100644 index 00000000..faf12f36 --- /dev/null +++ b/update.sh @@ -0,0 +1,67 @@ +#!/bin/bash + +echo "Hello from the update.sh script!" +echo $(date) + +# Set variables to the positional parameters +OLD_VERSION=$1 +NEW_VERSION=$2 +BUILD_LABEL=$3 + +# See if NEW_VERSION and OLD_VERSION fit expected pattern. +if [[ $OLD_VERSION =~ 2[3-9]\.0\.0\.[0-9]+ && $NEW_VERSION =~ 2[3-9]\.0\.0\.[0-9]+ ]]; +then + echo "$OLD_VERSION and $NEW_VERSION matches expected version format." +else + echo "Either $OLD_VERSION or $NEW_VERSION does not fit expected version format." + exit 1; +fi + +# Get last digit of old version +OLD_SHORT_VERSION=${OLD_VERSION:7} + +echo "OLD_VERSION = $OLD_VERSION" +echo "NEW_VERSION = $NEW_VERSION" +echo "BUILD_LABEL = $BUILD_LABEL" +echo "OLD_SHORT_VERSION = $OLD_SHORT_VERSION" + +echo "Copying latest files to $NEW_VERSION" +cp -r ./ga/latest ./ga/$NEW_VERSION + +# Perform the substitutions in both latest and $NEW_VERSION directories. +for file in $(find ./ga/latest ./ga/$NEW_VERSION -name Dockerfile.*); do + echo "Processing $file"; + + sed -i'.bak' -e "s/$OLD_VERSION/$NEW_VERSION/" $file; + sed -i'.bak' -e "s/ARG LIBERTY_BUILD_LABEL=.*/ARG LIBERTY_BUILD_LABEL=$BUILD_LABEL/g" $file; + + # Do these substitutions only in $NEW_VERSION, not latest. + if [[ "$file" == "./ga/$NEW_VERSION/"* ]]; + then + sed -i'.bak' -e "s/ARG PARENT_IMAGE=icr.io\/appcafe\/websphere-liberty:kernel/ARG PARENT_IMAGE=icr.io\/appcafe\/websphere-liberty:$NEW_VERSION-kernel/g" $file; + sed -i'.bak' -e "s/FROM websphere-liberty:kernel/FROM websphere-liberty:$NEW_VERSION-kernel/g" $file; + fi + + # Clean up temp files + rm $file.bak + +done + +cp ./ga/$OLD_VERSION/images.txt ./ga/$NEW_VERSION/images.txt; +sed -i'.bak' -e "s/$OLD_VERSION/$NEW_VERSION/g" ./ga/$NEW_VERSION/images.txt; +rm ./ga/$NEW_VERSION/images.txt.bak; + +if [[ $(( $OLD_SHORT_VERSION % 3 )) -eq 0 ]] + then + : + else + rm -rf ./ga/$OLD_VERSION + fi + +# Finally, comment out "ga/*/*/resources/*" in .gitignore so +# newly created $NEW_VERSION/full/resources and $NEW_VERSION/kernel/resources +# directories can be committed and pushed. +sed -i'.bak' -e "s/ga\/\*\/\*\/resources\/\*/#ga\/\*\/\*\/resources\/\*/g" .gitignore +rm ./.gitignore.bak + +echo "Done performing file updates."; From 15b7ab83dd9d3c3c691b451d6523045718b2f5e0 Mon Sep 17 00:00:00 2001 From: Wendy Raschke Date: Fri, 27 Oct 2023 11:42:23 -0500 Subject: [PATCH 3/9] Correct repository name in checkout step --- .github/workflows/update_files_for_release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/update_files_for_release.yml b/.github/workflows/update_files_for_release.yml index 11301294..62f58113 100644 --- a/.github/workflows/update_files_for_release.yml +++ b/.github/workflows/update_files_for_release.yml @@ -34,7 +34,7 @@ jobs: uses: actions/checkout@v4 with: ref: vNext - repository: wraschke/ci.docker + repository: WASdev/ci.docker - run: echo "💡 The ${{ github.repository }} repository has been cloned to the runner." From b61d0242bd44cc24e2881a5c5006e517cc860abb Mon Sep 17 00:00:00 2001 From: Wendy Raschke Date: Fri, 27 Oct 2023 11:55:44 -0500 Subject: [PATCH 4/9] Incorrect assumptions in debug and comments --- .github/workflows/update_files_for_release.yml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/update_files_for_release.yml b/.github/workflows/update_files_for_release.yml index 62f58113..bec4eb8a 100644 --- a/.github/workflows/update_files_for_release.yml +++ b/.github/workflows/update_files_for_release.yml @@ -27,17 +27,18 @@ jobs: runs-on: ubuntu-latest steps: - - name: Show useful information about the environment - run: echo "🔎 The name of the branch is ${{ github.ref }} and repository is ${{ github.repository }}." + - name: Show useful information about the workflow environment + run: echo "🔎 This workflow is running in branch ${{ github.ref }} and repository ${{ github.repository }}." - - name: Check out repository code + # This repository and branch to clone and checkout on runner + # could be different than repo and branch where workflow runs. + # Be aware of this nuance. + - name: Check out repository code to runner uses: actions/checkout@v4 with: ref: vNext repository: WASdev/ci.docker - - run: echo "💡 The ${{ github.repository }} repository has been cloned to the runner." - - name: Run update.sh script run: bash ./update.sh ${{ inputs.OLD_VERSION }} ${{ inputs.NEW_VERSION }} ${{ inputs.BUILD_LABEL }} From 0079e18d2a532d281f23292eece52f9099048bb7 Mon Sep 17 00:00:00 2001 From: Wendy Raschke Date: Fri, 27 Oct 2023 12:31:52 -0500 Subject: [PATCH 5/9] update.sh script does not need to be in main, should reside only in vNext --- update.sh | 67 ------------------------------------------------------- 1 file changed, 67 deletions(-) delete mode 100644 update.sh diff --git a/update.sh b/update.sh deleted file mode 100644 index faf12f36..00000000 --- a/update.sh +++ /dev/null @@ -1,67 +0,0 @@ -#!/bin/bash - -echo "Hello from the update.sh script!" -echo $(date) - -# Set variables to the positional parameters -OLD_VERSION=$1 -NEW_VERSION=$2 -BUILD_LABEL=$3 - -# See if NEW_VERSION and OLD_VERSION fit expected pattern. -if [[ $OLD_VERSION =~ 2[3-9]\.0\.0\.[0-9]+ && $NEW_VERSION =~ 2[3-9]\.0\.0\.[0-9]+ ]]; -then - echo "$OLD_VERSION and $NEW_VERSION matches expected version format." -else - echo "Either $OLD_VERSION or $NEW_VERSION does not fit expected version format." - exit 1; -fi - -# Get last digit of old version -OLD_SHORT_VERSION=${OLD_VERSION:7} - -echo "OLD_VERSION = $OLD_VERSION" -echo "NEW_VERSION = $NEW_VERSION" -echo "BUILD_LABEL = $BUILD_LABEL" -echo "OLD_SHORT_VERSION = $OLD_SHORT_VERSION" - -echo "Copying latest files to $NEW_VERSION" -cp -r ./ga/latest ./ga/$NEW_VERSION - -# Perform the substitutions in both latest and $NEW_VERSION directories. -for file in $(find ./ga/latest ./ga/$NEW_VERSION -name Dockerfile.*); do - echo "Processing $file"; - - sed -i'.bak' -e "s/$OLD_VERSION/$NEW_VERSION/" $file; - sed -i'.bak' -e "s/ARG LIBERTY_BUILD_LABEL=.*/ARG LIBERTY_BUILD_LABEL=$BUILD_LABEL/g" $file; - - # Do these substitutions only in $NEW_VERSION, not latest. - if [[ "$file" == "./ga/$NEW_VERSION/"* ]]; - then - sed -i'.bak' -e "s/ARG PARENT_IMAGE=icr.io\/appcafe\/websphere-liberty:kernel/ARG PARENT_IMAGE=icr.io\/appcafe\/websphere-liberty:$NEW_VERSION-kernel/g" $file; - sed -i'.bak' -e "s/FROM websphere-liberty:kernel/FROM websphere-liberty:$NEW_VERSION-kernel/g" $file; - fi - - # Clean up temp files - rm $file.bak - -done - -cp ./ga/$OLD_VERSION/images.txt ./ga/$NEW_VERSION/images.txt; -sed -i'.bak' -e "s/$OLD_VERSION/$NEW_VERSION/g" ./ga/$NEW_VERSION/images.txt; -rm ./ga/$NEW_VERSION/images.txt.bak; - -if [[ $(( $OLD_SHORT_VERSION % 3 )) -eq 0 ]] - then - : - else - rm -rf ./ga/$OLD_VERSION - fi - -# Finally, comment out "ga/*/*/resources/*" in .gitignore so -# newly created $NEW_VERSION/full/resources and $NEW_VERSION/kernel/resources -# directories can be committed and pushed. -sed -i'.bak' -e "s/ga\/\*\/\*\/resources\/\*/#ga\/\*\/\*\/resources\/\*/g" .gitignore -rm ./.gitignore.bak - -echo "Done performing file updates."; From e7dd1d03177d8953952e9901da248c38404101b0 Mon Sep 17 00:00:00 2001 From: Wendy Raschke Date: Mon, 30 Oct 2023 14:23:16 -0500 Subject: [PATCH 6/9] Commit Travis YML changes --- .github/workflows/update_files_for_release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/update_files_for_release.yml b/.github/workflows/update_files_for_release.yml index bec4eb8a..899c5d4d 100644 --- a/.github/workflows/update_files_for_release.yml +++ b/.github/workflows/update_files_for_release.yml @@ -48,7 +48,7 @@ jobs: default_author: github_actions author_name: GitHub Actions message: "Updates for the release of ${{ inputs.NEW_VERSION }}" - add: '${{ github.workspace }}/ga/*' + add: '${{ github.workspace }}/ga/* ${{ github.workspace }}/.travis.yml' new_branch: "${{ inputs.NEW_VERSION }}-release" push: true tag_push: '--force' From bd4da82b316a570a77d645e08d4993f5f9bfc52c Mon Sep 17 00:00:00 2001 From: Wendy Raschke Date: Tue, 31 Oct 2023 10:52:04 -0500 Subject: [PATCH 7/9] Script rename and in subdir --- .github/workflows/update_files_for_release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/update_files_for_release.yml b/.github/workflows/update_files_for_release.yml index 899c5d4d..5ac2f41e 100644 --- a/.github/workflows/update_files_for_release.yml +++ b/.github/workflows/update_files_for_release.yml @@ -40,7 +40,7 @@ jobs: repository: WASdev/ci.docker - name: Run update.sh script - run: bash ./update.sh ${{ inputs.OLD_VERSION }} ${{ inputs.NEW_VERSION }} ${{ inputs.BUILD_LABEL }} + run: bash ./internal/create-new-release.sh ${{ inputs.OLD_VERSION }} ${{ inputs.NEW_VERSION }} ${{ inputs.BUILD_LABEL }} - name: Commit changes uses: EndBug/add-and-commit@v9 From 99ff36ef29700f3d6dcf2387a040b329b9a550e3 Mon Sep 17 00:00:00 2001 From: Wendy Raschke Date: Tue, 31 Oct 2023 12:09:41 -0500 Subject: [PATCH 8/9] Restore location structure of script and add .travis.yml --- .github/workflows/update_files_for_release.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/update_files_for_release.yml b/.github/workflows/update_files_for_release.yml index 5ac2f41e..60637515 100644 --- a/.github/workflows/update_files_for_release.yml +++ b/.github/workflows/update_files_for_release.yml @@ -39,8 +39,8 @@ jobs: ref: vNext repository: WASdev/ci.docker - - name: Run update.sh script - run: bash ./internal/create-new-release.sh ${{ inputs.OLD_VERSION }} ${{ inputs.NEW_VERSION }} ${{ inputs.BUILD_LABEL }} + - name: Run update script + run: bash ./create-new-release.sh ${{ inputs.OLD_VERSION }} ${{ inputs.NEW_VERSION }} ${{ inputs.BUILD_LABEL }} - name: Commit changes uses: EndBug/add-and-commit@v9 From 876a7cbdafae63268e121a6ecda6289876782b57 Mon Sep 17 00:00:00 2001 From: Leo Christy Jesuraj Date: Tue, 14 Nov 2023 21:41:52 -0500 Subject: [PATCH 9/9] List 23.0.0.11 images --- docs/icr-images.md | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/docs/icr-images.md b/docs/icr-images.md index 4bb05b1e..fa82eabb 100644 --- a/docs/icr-images.md +++ b/docs/icr-images.md @@ -22,7 +22,7 @@ ibmcloud cr images --restrict appcafe/websphere-liberty ``` -## Latest version (23.0.0.10) +## Latest version (23.0.0.11) ``` kernel-java8-openj9-ubi @@ -36,18 +36,18 @@ full-java11-openj9-ubi full-java17-openj9-ubi ``` -## 23.0.0.10 +## 23.0.0.11 ``` -23.0.0.10-kernel-java8-openj9-ubi -23.0.0.10-kernel-java8-ibmjava-ubi -23.0.0.10-kernel-java11-openj9-ubi -23.0.0.10-kernel-java17-openj9-ubi - -23.0.0.10-full-java8-openj9-ubi -23.0.0.10-full-java8-ibmjava-ubi -23.0.0.10-full-java11-openj9-ubi -23.0.0.10-full-java17-openj9-ubi +23.0.0.11-kernel-java8-openj9-ubi +23.0.0.11-kernel-java8-ibmjava-ubi +23.0.0.11-kernel-java11-openj9-ubi +23.0.0.11-kernel-java17-openj9-ubi + +23.0.0.11-full-java8-openj9-ubi +23.0.0.11-full-java8-ibmjava-ubi +23.0.0.11-full-java11-openj9-ubi +23.0.0.11-full-java17-openj9-ubi ``` ## 23.0.0.9