Skip to content

Commit

Permalink
Merge pull request #108 from brianhlin/SOFTWARE-5673.osg23
Browse files Browse the repository at this point in the history
Add OSG 23 images (SOFTWARE-5673)
  • Loading branch information
matyasselmeci authored Oct 3, 2023
2 parents 33c72f4 + cfeee11 commit fa1d9b7
Show file tree
Hide file tree
Showing 2 changed files with 61 additions and 22 deletions.
78 changes: 58 additions & 20 deletions .github/workflows/release-series-builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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/[email protected]
Expand All @@ -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
Expand All @@ -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/[email protected]
Expand All @@ -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
Expand All @@ -98,21 +118,30 @@ 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

- name: Load stash-cache build cache
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/[email protected]
Expand All @@ -123,7 +152,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
Expand All @@ -135,7 +164,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
Expand All @@ -155,13 +184,22 @@ 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:
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:
Expand All @@ -171,13 +209,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: |
Expand Down Expand Up @@ -216,7 +254,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
5 changes: 3 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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 <[email protected]>

# Previous arg has gone out of scope
Expand Down

0 comments on commit fa1d9b7

Please sign in to comment.