1515
1616jobs :
1717 base-image-build :
18- name : xcache:${{ matrix.osg_series }}-${{ matrix.repo }} image build
18+ name : xcache:${{ matrix.osg_series.name }}-${{ matrix.repo }} image build
1919 runs-on : ubuntu-latest
2020 strategy :
2121 fail-fast : False
2222 matrix :
2323 repo : ['development', 'testing', 'release']
24- osg_series : ['3.6']
24+ osg_series :
25+ - name : ' 3.6'
26+ os : ' el7'
27+ - name : ' 23'
28+ os : ' el9'
29+ # FIXME: disable OSG 23 dev until we have fixed the mash
30+ # cache + signed RPMs issue in the prod repo
31+ exclude :
32+ - repo : ' development'
33+ osg_series : {name: '23', os: 'el9'}
2534 steps :
2635
2736 - uses : actions/checkout@v3
@@ -30,11 +39,11 @@ jobs:
3039 uses : actions/cache@v3
3140 with :
3241 path : /tmp/.base-buildx-cache
33- key : base-${{ matrix.osg_series}}-${{ matrix.repo }}-buildx-${{ github.sha }}-${{ github.run_id }}
42+ key : base-${{ matrix.osg_series.name }}-${{ matrix.repo }}-buildx-${{ github.sha }}-${{ github.run_id }}
3443 # allow cache hits from previous runs of the current branch,
3544 # parent branch, then upstream branches, in that order
3645 restore-keys : |
37- base-${{ matrix.osg_series }}-${{ matrix.repo }}-buildx-
46+ base-${{ matrix.osg_series.name }}-${{ matrix.repo }}-buildx-
3847
3948 - name : Set up Docker Buildx
4049@@ -45,20 +54,30 @@ jobs:
4554 context : .
4655 build-args : |
4756 BASE_YUM_REPO=${{ matrix.repo }}
48- BASE_OSG_SERIES=${{ matrix.osg_series }}
57+ BASE_OSG_SERIES=${{ matrix.osg_series.name }}
58+ BASE_OS=${{ matrix.osg_series.os }}
4959 pull : True
5060 target : xcache
5161 cache-to : type=local,dest=/tmp/.base-buildx-cache,mode=max
5262
5363 xcache-image-builds :
54- name : ${{ matrix.image }}:${{ matrix.osg_series }}-${{ matrix.repo }} image build
64+ name : ${{ matrix.image }}:${{ matrix.osg_series.name }}-${{ matrix.repo }} image build
5565 needs : [base-image-build]
5666 strategy :
5767 fail-fast : False
5868 matrix :
5969 image : [atlas-xcache, cms-xcache, stash-cache, stash-origin]
6070 repo : ['development', 'testing', 'release']
61- osg_series : ['3.6']
71+ osg_series :
72+ - name : ' 3.6'
73+ os : ' el7'
74+ - name : ' 23'
75+ os : ' el9'
76+ # FIXME: disable OSG 23 dev until we have fixed the mash
77+ # cache + signed RPMs issue in the prod repo
78+ exclude :
79+ - repo : ' development'
80+ osg_series : {name: '23', os: 'el9'}
6281 runs-on : ubuntu-latest
6382 steps :
6483 - uses : actions/checkout@v3
@@ -67,13 +86,13 @@ jobs:
6786 uses : actions/cache@v3
6887 with :
6988 path : /tmp/.base-buildx-cache
70- key : base-${{ matrix.osg_series }}-${{ matrix.repo }}-buildx-${{ github.sha }}-${{ github.run_id }}
89+ key : base-${{ matrix.osg_series.name }}-${{ matrix.repo }}-buildx-${{ github.sha }}-${{ github.run_id }}
7190
7291 - name : Cache child image
7392 uses : actions/cache@v3
7493 with :
7594 path : /tmp/.${{ matrix.image }}-buildx-cache
76- key : ${{ matrix.image}}-${{matrix.osg_series }}-${{ matrix.repo}}-build-${{ github.sha}}-${{ github.run_id }}
95+ key : ${{ matrix.image}}-${{matrix.osg_series.name }}-${{ matrix.repo}}-build-${{ github.sha}}-${{ github.run_id }}
7796
7897 - name : Set up Docker Buildx
799884103 context : .
85104 build-args : |
86105 BASE_YUM_REPO=${{ matrix.repo }}
87- BASE_OSG_SERIES=${{ matrix.osg_series }}
106+ BASE_OSG_SERIES=${{ matrix.osg_series.name }}
107+ BASE_OS=${{ matrix.osg_series.os }}
88108 target : ${{ matrix.image }}
89109 cache-from : type=local,src=/tmp/.base-buildx-cache
90110 cache-to : type=local,dest=/tmp/.${{ matrix.image }}-buildx-cache,mode=max
@@ -106,13 +126,13 @@ jobs:
106126 uses : actions/cache@v3
107127 with :
108128 path : /tmp/.stash-cache-buildx-cache
109- key : stash-cache-${{ matrix.osg_series }}-${{ matrix.repo}}-build-${{ github.sha}}-${{ github.run_id }}
129+ key : stash-cache-${{ matrix.osg_series.name }}-${{ matrix.repo}}-build-${{ github.sha}}-${{ github.run_id }}
110130
111131 - name : Load stash-origin build cache
112132 uses : actions/cache@v3
113133 with :
114134 path : /tmp/.stash-origin-buildx-cache
115- key : stash-origin-${{ matrix.osg_series }}-${{ matrix.repo}}-build-${{ github.sha}}-${{ github.run_id }}
135+ key : stash-origin-${{ matrix.osg_series.name }}-${{ matrix.repo}}-build-${{ github.sha}}-${{ github.run_id }}
116136
117137 - name : Set up Docker Buildx
118138@@ -123,7 +143,7 @@ jobs:
123143 context : .
124144 build-args : |
125145 BASE_YUM_REPO=${{ matrix.repo }}
126- BASE_OSG_SERIES=${{ matrix.osg_series }}
146+ BASE_OSG_SERIES=${{ matrix.osg_series.name }}
127147 load : True # allow access to built images through the Docker CLI
128148 tags : stash-cache:latest
129149 target : stash-cache
@@ -135,7 +155,7 @@ jobs:
135155 context : .
136156 build-args : |
137157 BASE_YUM_REPO=${{ matrix.repo }}
138- BASE_OSG_SERIES=${{ matrix.osg_series }}
158+ BASE_OSG_SERIES=${{ matrix.osg_series.name }}
139159 load : True # allow access to built images through the Docker CLI
140160 tags : stash-origin:latest
141161 target : stash-origin
@@ -155,7 +175,7 @@ jobs:
155175 run : echo "dtag=$(date +%Y%m%d-%H%M)" >> $GITHUB_OUTPUT
156176
157177 push-images :
158- name : Push ${{ matrix.image }}:${{ matrix.osg_series }}-${{ matrix.repo }} image
178+ name : Push ${{ matrix.image }}:${{ matrix.osg_series.name }}-${{ matrix.repo }} image
159179 if : contains(fromJson('["push", "repository_dispatch", "workflow_dispatch"]'), github.event_name) && startsWith(github.repository, 'opensciencegrid/')
160180 strategy :
161181 matrix :
@@ -171,13 +191,13 @@ jobs:
171191 uses : actions/cache@v3
172192 with :
173193 path : /tmp/.${{ matrix.image }}-buildx-cache
174- key : ${{ matrix.image}}-${{ matrix.osg_series }}-${{ matrix.repo}}-build-${{ github.sha}}-${{ github.run_id }}
194+ key : ${{ matrix.image}}-${{ matrix.osg_series.name }}-${{ matrix.repo}}-build-${{ github.sha}}-${{ github.run_id }}
175195
176196 - name : Generate tag list
177197 id : generate-tag-list
178198 env :
179199 REPO : ${{ matrix.repo }}
180- SERIES : ${{ matrix.osg_series }}
200+ SERIES : ${{ matrix.osg_series.name }}
181201 IMAGE : ${{ matrix.image }}
182202 TIMESTAMP : ${{ needs.make-date-tag.outputs.dtag }}
183203 run : |
@@ -216,7 +236,7 @@ jobs:
216236 push : True
217237 build-args : |
218238 BASE_YUM_REPO=${{ matrix.repo }}
219- BASE_OSG_SERIES=${{ matrix.osg_series }}
239+ BASE_OSG_SERIES=${{ matrix.osg_series.name }}
220240 tags : " ${{ steps.generate-tag-list.outputs.taglist }}"
221241 target : ${{ matrix.image }}
222242 cache-from : type=local,src=/tmp/.${{ matrix.image }}-buildx-cache
0 commit comments