From ddf9ecb8b43a89137d36723c74115106f07af4a9 Mon Sep 17 00:00:00 2001 From: Brian Lin Date: Tue, 26 Sep 2023 14:18:23 -0500 Subject: [PATCH 1/2] Add OSG 23 images (SOFTWARE-5673) --- .github/workflows/release-series-builds.yml | 56 ++++++++++++++------- Dockerfile | 5 +- 2 files changed, 41 insertions(+), 20 deletions(-) diff --git a/.github/workflows/release-series-builds.yml b/.github/workflows/release-series-builds.yml index e5ff367..ca967d8 100644 --- a/.github/workflows/release-series-builds.yml +++ b/.github/workflows/release-series-builds.yml @@ -15,13 +15,22 @@ on: jobs: base-image-build: - name: xcache:${{ matrix.osg_series }}-${{ matrix.repo }} image build + name: xcache:${{ matrix.osg_series.name }}-${{ matrix.repo }} image build runs-on: ubuntu-latest strategy: fail-fast: False matrix: repo: ['development', 'testing', 'release'] - osg_series: ['3.6'] + osg_series: + - name: '3.6' + os: 'el7' + - name: '23' + os: 'el9' + # FIXME: disable OSG 23 dev until we have fixed the mash + # cache + signed RPMs issue in the prod repo + exclude: + - repo: 'development' + osg_series: {name: '23', os: 'el9'} steps: - uses: actions/checkout@v3 @@ -30,11 +39,11 @@ jobs: uses: actions/cache@v3 with: path: /tmp/.base-buildx-cache - key: base-${{ matrix.osg_series}}-${{ matrix.repo }}-buildx-${{ github.sha }}-${{ github.run_id }} + key: base-${{ matrix.osg_series.name }}-${{ matrix.repo }}-buildx-${{ github.sha }}-${{ github.run_id }} # allow cache hits from previous runs of the current branch, # parent branch, then upstream branches, in that order restore-keys: | - base-${{ matrix.osg_series }}-${{ matrix.repo }}-buildx- + base-${{ matrix.osg_series.name }}-${{ matrix.repo }}-buildx- - name: Set up Docker Buildx uses: docker/setup-buildx-action@v2.7.0 @@ -45,20 +54,30 @@ jobs: context: . build-args: | BASE_YUM_REPO=${{ matrix.repo }} - BASE_OSG_SERIES=${{ matrix.osg_series }} + BASE_OSG_SERIES=${{ matrix.osg_series.name }} + BASE_OS=${{ matrix.osg_series.os }} pull: True target: xcache cache-to: type=local,dest=/tmp/.base-buildx-cache,mode=max xcache-image-builds: - name: ${{ matrix.image }}:${{ matrix.osg_series }}-${{ matrix.repo }} image build + name: ${{ matrix.image }}:${{ matrix.osg_series.name }}-${{ matrix.repo }} image build needs: [base-image-build] strategy: fail-fast: False matrix: image: [atlas-xcache, cms-xcache, stash-cache, stash-origin] repo: ['development', 'testing', 'release'] - osg_series: ['3.6'] + osg_series: + - name: '3.6' + os: 'el7' + - name: '23' + os: 'el9' + # FIXME: disable OSG 23 dev until we have fixed the mash + # cache + signed RPMs issue in the prod repo + exclude: + - repo: 'development' + osg_series: {name: '23', os: 'el9'} runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 @@ -67,13 +86,13 @@ jobs: uses: actions/cache@v3 with: path: /tmp/.base-buildx-cache - key: base-${{ matrix.osg_series }}-${{ matrix.repo }}-buildx-${{ github.sha }}-${{ github.run_id }} + key: base-${{ matrix.osg_series.name }}-${{ matrix.repo }}-buildx-${{ github.sha }}-${{ github.run_id }} - name: Cache child image uses: actions/cache@v3 with: path: /tmp/.${{ matrix.image }}-buildx-cache - key: ${{ matrix.image}}-${{matrix.osg_series }}-${{ matrix.repo}}-build-${{ github.sha}}-${{ github.run_id }} + key: ${{ matrix.image}}-${{matrix.osg_series.name }}-${{ matrix.repo}}-build-${{ github.sha}}-${{ github.run_id }} - name: Set up Docker Buildx uses: docker/setup-buildx-action@v2.7.0 @@ -84,7 +103,8 @@ jobs: context: . build-args: | BASE_YUM_REPO=${{ matrix.repo }} - BASE_OSG_SERIES=${{ matrix.osg_series }} + BASE_OSG_SERIES=${{ matrix.osg_series.name }} + BASE_OS=${{ matrix.osg_series.os }} target: ${{ matrix.image }} cache-from: type=local,src=/tmp/.base-buildx-cache cache-to: type=local,dest=/tmp/.${{ matrix.image }}-buildx-cache,mode=max @@ -106,13 +126,13 @@ jobs: uses: actions/cache@v3 with: path: /tmp/.stash-cache-buildx-cache - key: stash-cache-${{ matrix.osg_series }}-${{ matrix.repo}}-build-${{ github.sha}}-${{ github.run_id }} + key: stash-cache-${{ matrix.osg_series.name }}-${{ matrix.repo}}-build-${{ github.sha}}-${{ github.run_id }} - name: Load stash-origin build cache uses: actions/cache@v3 with: path: /tmp/.stash-origin-buildx-cache - key: stash-origin-${{ matrix.osg_series }}-${{ matrix.repo}}-build-${{ github.sha}}-${{ github.run_id }} + key: stash-origin-${{ matrix.osg_series.name }}-${{ matrix.repo}}-build-${{ github.sha}}-${{ github.run_id }} - name: Set up Docker Buildx uses: docker/setup-buildx-action@v2.7.0 @@ -123,7 +143,7 @@ jobs: context: . build-args: | BASE_YUM_REPO=${{ matrix.repo }} - BASE_OSG_SERIES=${{ matrix.osg_series }} + BASE_OSG_SERIES=${{ matrix.osg_series.name }} load: True # allow access to built images through the Docker CLI tags: stash-cache:latest target: stash-cache @@ -135,7 +155,7 @@ jobs: context: . build-args: | BASE_YUM_REPO=${{ matrix.repo }} - BASE_OSG_SERIES=${{ matrix.osg_series }} + BASE_OSG_SERIES=${{ matrix.osg_series.name }} load: True # allow access to built images through the Docker CLI tags: stash-origin:latest target: stash-origin @@ -155,7 +175,7 @@ jobs: run: echo "dtag=$(date +%Y%m%d-%H%M)" >> $GITHUB_OUTPUT push-images: - name: Push ${{ matrix.image }}:${{ matrix.osg_series }}-${{ matrix.repo }} image + name: Push ${{ matrix.image }}:${{ matrix.osg_series.name }}-${{ matrix.repo }} image if: contains(fromJson('["push", "repository_dispatch", "workflow_dispatch"]'), github.event_name) && startsWith(github.repository, 'opensciencegrid/') strategy: matrix: @@ -171,13 +191,13 @@ jobs: uses: actions/cache@v3 with: path: /tmp/.${{ matrix.image }}-buildx-cache - key: ${{ matrix.image}}-${{ matrix.osg_series }}-${{ matrix.repo}}-build-${{ github.sha}}-${{ github.run_id }} + key: ${{ matrix.image}}-${{ matrix.osg_series.name }}-${{ matrix.repo}}-build-${{ github.sha}}-${{ github.run_id }} - name: Generate tag list id: generate-tag-list env: REPO: ${{ matrix.repo }} - SERIES: ${{ matrix.osg_series }} + SERIES: ${{ matrix.osg_series.name }} IMAGE: ${{ matrix.image }} TIMESTAMP: ${{ needs.make-date-tag.outputs.dtag }} run: | @@ -216,7 +236,7 @@ jobs: push: True build-args: | BASE_YUM_REPO=${{ matrix.repo }} - BASE_OSG_SERIES=${{ matrix.osg_series }} + BASE_OSG_SERIES=${{ matrix.osg_series.name }} tags: "${{ steps.generate-tag-list.outputs.taglist }}" target: ${{ matrix.image }} cache-from: type=local,src=/tmp/.${{ matrix.image }}-buildx-cache diff --git a/Dockerfile b/Dockerfile index cd596b8..2dc6449 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,9 +4,10 @@ # Specify the base Yum repository to get the necessary RPMs ARG BASE_YUM_REPO=testing -ARG BASE_OSG_SERIES=3.6 +ARG BASE_OSG_SERIES=23 +ARG BASE_OS=el9 -FROM opensciencegrid/software-base:$BASE_OSG_SERIES-el7-$BASE_YUM_REPO AS xcache +FROM opensciencegrid/software-base:$BASE_OSG_SERIES-$BASE_OS-$BASE_YUM_REPO AS xcache LABEL maintainer OSG Software # Previous arg has gone out of scope From cfeee119f2293445fbcf7fb6e203de37e58349a1 Mon Sep 17 00:00:00 2001 From: Brian Lin Date: Tue, 3 Oct 2023 17:08:35 -0500 Subject: [PATCH 2/2] Fix missed test/push updates for OSG 23 --- .github/workflows/release-series-builds.yml | 22 +++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release-series-builds.yml b/.github/workflows/release-series-builds.yml index ca967d8..3be3683 100644 --- a/.github/workflows/release-series-builds.yml +++ b/.github/workflows/release-series-builds.yml @@ -118,7 +118,16 @@ jobs: fail-fast: False matrix: repo: ['development', 'testing', 'release'] - osg_series: ['3.6'] + osg_series: + - name: '3.6' + os: 'el7' + - name: '23' + os: 'el9' + # FIXME: disable OSG 23 dev until we have fixed the mash + # cache + signed RPMs issue in the prod repo + exclude: + - repo: 'development' + osg_series: {name: '23', os: 'el9'} steps: - uses: actions/checkout@v3 @@ -181,7 +190,16 @@ jobs: matrix: image: [atlas-xcache, cms-xcache, stash-cache, stash-origin, xcache] repo: ['development', 'testing', 'release'] - osg_series: ['3.6'] + osg_series: + - name: '3.6' + os: 'el7' + - name: '23' + os: 'el9' + # FIXME: disable OSG 23 dev until we have fixed the mash + # cache + signed RPMs issue in the prod repo + exclude: + - repo: 'development' + osg_series: {name: '23', os: 'el9'} needs: [make-date-tag, test-stash-cache] runs-on: ubuntu-latest steps: