Skip to content

Commit bb3d3f3

Browse files
authored
Merge pull request opendatahub-io#234 from HumairAK/tag_build
Add workflow for src image build and push to tag.
2 parents 96a923d + 8c131cf commit bb3d3f3

File tree

1 file changed

+283
-0
lines changed

1 file changed

+283
-0
lines changed

.github/workflows/tag-and-build.yml

Lines changed: 283 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,283 @@
1+
name: Build images from sources.
2+
run-name: Build images from sources.
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
src_branch:
7+
default: 'v1.0.x'
8+
description: 'Source branch to build DSPO/DSP from'
9+
required: true
10+
target_tag:
11+
default: 'vx.y.z'
12+
description: 'Target Image Tag'
13+
required: true
14+
quay_org:
15+
default: 'opendatahub'
16+
description: 'Quay Organization'
17+
required: true
18+
dsp_org_repo:
19+
default: 'opendatahub-io/data-science-pipelines'
20+
description: 'DSP org/repo'
21+
required: true
22+
env:
23+
IMAGE_DSPO: data-science-pipelines-operator
24+
IMAGE_SERVER: ds-pipelines-api-server
25+
IMAGE_UI: ds-pipelines-frontend
26+
IMAGE_CACHE: ds-pipelines-cacheserver
27+
IMAGE_PA: ds-pipelines-persistenceagent
28+
IMAGE_SWF: ds-pipelines-scheduledworkflow
29+
IMAGE_VC: ds-pipelines-viewercontroller
30+
IMAGE_ARTIFACT: ds-pipelines-artifact-manager
31+
IMAGE_MLMD_WRITER: ds-pipelines-metadata-writer
32+
IMAGE_MLMD_ENVOY: ds-pipelines-metadata-envoy
33+
IMAGE_MLMD_GRPC: ds-pipelines-metadata-grpc
34+
jobs:
35+
dspo-build:
36+
runs-on: ubuntu-latest
37+
permissions:
38+
contents: read
39+
steps:
40+
- uses: actions/checkout@v3
41+
with:
42+
ref: ${{ inputs.src_branch }}
43+
44+
- name: Login to Quay.io
45+
uses: redhat-actions/podman-login@v1
46+
with:
47+
username: ${{ secrets.QUAY_ID }}
48+
password: ${{ secrets.QUAY_TOKEN }}
49+
registry: quay.io
50+
51+
- name: Image Build and Push
52+
run: |
53+
make podman-build podman-push -e IMG=quay.io/${{ inputs.quay_org }}/${IMAGE_DSPO}:${{ inputs.target_tag }}
54+
55+
server-build:
56+
runs-on: ubuntu-latest
57+
permissions:
58+
contents: read
59+
env:
60+
IMAGE_ORG_BASE: quay.io/${{ inputs.quay_org }}
61+
steps:
62+
- uses: actions/checkout@v3
63+
with:
64+
repository: ${{ inputs.dsp_org_repo }}
65+
ref: ${{ inputs.src_branch }}
66+
- name: Login to Quay.io
67+
uses: redhat-actions/podman-login@v1
68+
with:
69+
username: ${{ secrets.QUAY_ID }}
70+
password: ${{ secrets.QUAY_TOKEN }}
71+
registry: quay.io
72+
- name: Buid APIServer
73+
env:
74+
API_SERVER: quay.io/${{ inputs.quay_org }}/${IMAGE_SERVER}:${{ inputs.target_tag }}
75+
run: |
76+
podman build . -f backend/Dockerfile -t ${{ env.API_SERVER }} && podman push ${{ env.API_SERVER }}
77+
78+
ui-build:
79+
runs-on: ubuntu-latest
80+
permissions:
81+
contents: read
82+
env:
83+
IMAGE_ORG_BASE: quay.io/${{ inputs.quay_org }}
84+
steps:
85+
- uses: actions/checkout@v3
86+
with:
87+
repository: ${{ inputs.dsp_org_repo }}
88+
ref: ${{ inputs.src_branch }}
89+
- name: Login to Quay.io
90+
uses: redhat-actions/podman-login@v1
91+
with:
92+
username: ${{ secrets.QUAY_ID }}
93+
password: ${{ secrets.QUAY_TOKEN }}
94+
registry: quay.io
95+
- name: Build image
96+
env:
97+
UI: quay.io/${{ inputs.quay_org }}/${IMAGE_UI}:${{ inputs.target_tag }}
98+
run: |
99+
podman build . -f frontend/Dockerfile -t ${{ env.UI }} && podman push ${{ env.UI }}
100+
101+
cache-build:
102+
runs-on: ubuntu-latest
103+
permissions:
104+
contents: read
105+
env:
106+
IMAGE_ORG_BASE: quay.io/${{ inputs.quay_org }}
107+
steps:
108+
- uses: actions/checkout@v3
109+
with:
110+
repository: ${{ inputs.dsp_org_repo }}
111+
ref: ${{ inputs.src_branch }}
112+
- name: Login to Quay.io
113+
uses: redhat-actions/podman-login@v1
114+
with:
115+
username: ${{ secrets.QUAY_ID }}
116+
password: ${{ secrets.QUAY_TOKEN }}
117+
registry: quay.io
118+
- name: Build image
119+
env:
120+
CACHE: quay.io/${{ inputs.quay_org }}/${IMAGE_CACHE}:${{ inputs.target_tag }}
121+
run: |
122+
podman build . -f backend/Dockerfile.cacheserver -t ${{ env.CACHE }} && podman push ${{ env.CACHE }}
123+
124+
PA-build:
125+
runs-on: ubuntu-latest
126+
permissions:
127+
contents: read
128+
env:
129+
IMAGE_ORG_BASE: quay.io/${{ inputs.quay_org }}
130+
steps:
131+
- uses: actions/checkout@v3
132+
with:
133+
repository: ${{ inputs.dsp_org_repo }}
134+
ref: ${{ inputs.src_branch }}
135+
- name: Login to Quay.io
136+
uses: redhat-actions/podman-login@v1
137+
with:
138+
username: ${{ secrets.QUAY_ID }}
139+
password: ${{ secrets.QUAY_TOKEN }}
140+
registry: quay.io
141+
- name: Build image
142+
env:
143+
PA: quay.io/${{ inputs.quay_org }}/${IMAGE_PA}:${{ inputs.target_tag }}
144+
run: |
145+
podman build . -f backend/Dockerfile.persistenceagent -t ${{ env.PA }} && podman push ${{ env.PA }}
146+
147+
SWF-build:
148+
runs-on: ubuntu-latest
149+
permissions:
150+
contents: read
151+
env:
152+
IMAGE_ORG_BASE: quay.io/${{ inputs.quay_org }}
153+
steps:
154+
- uses: actions/checkout@v3
155+
with:
156+
repository: ${{ inputs.dsp_org_repo }}
157+
ref: ${{ inputs.src_branch }}
158+
- name: Login to Quay.io
159+
uses: redhat-actions/podman-login@v1
160+
with:
161+
username: ${{ secrets.QUAY_ID }}
162+
password: ${{ secrets.QUAY_TOKEN }}
163+
registry: quay.io
164+
- name: Build image
165+
env:
166+
SWF: quay.io/${{ inputs.quay_org }}/${IMAGE_SWF}:${{ inputs.target_tag }}
167+
run: |
168+
podman build . -f backend/Dockerfile.scheduledworkflow -t ${{ env.SWF }} && podman push ${{ env.SWF }}
169+
170+
VC-build:
171+
runs-on: ubuntu-latest
172+
permissions:
173+
contents: read
174+
env:
175+
IMAGE_ORG_BASE: quay.io/${{ inputs.quay_org }}
176+
steps:
177+
- uses: actions/checkout@v3
178+
with:
179+
repository: ${{ inputs.dsp_org_repo }}
180+
ref: ${{ inputs.src_branch }}
181+
- name: Login to Quay.io
182+
uses: redhat-actions/podman-login@v1
183+
with:
184+
username: ${{ secrets.QUAY_ID }}
185+
password: ${{ secrets.QUAY_TOKEN }}
186+
registry: quay.io
187+
- name: Build image
188+
env:
189+
VC: quay.io/${{ inputs.quay_org }}/${IMAGE_VC}:${{ inputs.target_tag }}
190+
run: |
191+
podman build . -f backend/Dockerfile.viewercontroller -t ${{ env.VC }} && podman push ${{ env.VC }}
192+
193+
ARTIFACT-build:
194+
runs-on: ubuntu-latest
195+
permissions:
196+
contents: read
197+
env:
198+
IMAGE_ORG_BASE: quay.io/${{ inputs.quay_org }}
199+
steps:
200+
- uses: actions/checkout@v3
201+
with:
202+
repository: ${{ inputs.dsp_org_repo }}
203+
ref: ${{ inputs.src_branch }}
204+
- name: Login to Quay.io
205+
uses: redhat-actions/podman-login@v1
206+
with:
207+
username: ${{ secrets.QUAY_ID }}
208+
password: ${{ secrets.QUAY_TOKEN }}
209+
registry: quay.io
210+
- name: Build image
211+
env:
212+
ARTIFACT: quay.io/${{ inputs.quay_org }}/${IMAGE_ARTIFACT}:${{ inputs.target_tag }}
213+
run: |
214+
podman build . -f backend/artifact_manager/Dockerfile -t ${{ env.ARTIFACT }} && podman push ${{ env.ARTIFACT }}
215+
216+
MLMD_WRITER-build:
217+
runs-on: ubuntu-latest
218+
permissions:
219+
contents: read
220+
env:
221+
IMAGE_ORG_BASE: quay.io/${{ inputs.quay_org }}
222+
steps:
223+
- uses: actions/checkout@v3
224+
with:
225+
repository: ${{ inputs.dsp_org_repo }}
226+
ref: ${{ inputs.src_branch }}
227+
- name: Login to Quay.io
228+
uses: redhat-actions/podman-login@v1
229+
with:
230+
username: ${{ secrets.QUAY_ID }}
231+
password: ${{ secrets.QUAY_TOKEN }}
232+
registry: quay.io
233+
- name: Build image
234+
env:
235+
MLMD_WRITER: quay.io/${{ inputs.quay_org }}/${IMAGE_MLMD_WRITER}:${{ inputs.target_tag }}
236+
run: |
237+
podman build . -f backend/metadata_writer/Dockerfile -t ${{ env.MLMD_WRITER }} && podman push ${{ env.MLMD_WRITER }}
238+
239+
MLMD_ENVOY-build:
240+
runs-on: ubuntu-latest
241+
permissions:
242+
contents: read
243+
env:
244+
IMAGE_ORG_BASE: quay.io/${{ inputs.quay_org }}
245+
steps:
246+
- uses: actions/checkout@v3
247+
with:
248+
repository: ${{ inputs.dsp_org_repo }}
249+
ref: ${{ inputs.src_branch }}
250+
- name: Login to Quay.io
251+
uses: redhat-actions/podman-login@v1
252+
with:
253+
username: ${{ secrets.QUAY_ID }}
254+
password: ${{ secrets.QUAY_TOKEN }}
255+
registry: quay.io
256+
- name: Build image
257+
env:
258+
MLMD_ENVOY: quay.io/${{ inputs.quay_org }}/${IMAGE_MLMD_ENVOY}:${{ inputs.target_tag }}
259+
run: |
260+
podman build . -f third-party/metadata_envoy/Dockerfile -t ${{ env.MLMD_ENVOY }} && podman push ${{ env.MLMD_ENVOY }}
261+
262+
MLMD_GRPC-build:
263+
runs-on: ubuntu-latest
264+
permissions:
265+
contents: read
266+
env:
267+
IMAGE_ORG_BASE: quay.io/${{ inputs.quay_org }}
268+
steps:
269+
- uses: actions/checkout@v3
270+
with:
271+
repository: ${{ inputs.dsp_org_repo }}
272+
ref: ${{ inputs.src_branch }}
273+
- name: Login to Quay.io
274+
uses: redhat-actions/podman-login@v1
275+
with:
276+
username: ${{ secrets.QUAY_ID }}
277+
password: ${{ secrets.QUAY_TOKEN }}
278+
registry: quay.io
279+
- name: Build image
280+
env:
281+
MLMD_GRPC: quay.io/${{ inputs.quay_org }}/${IMAGE_MLMD_GRPC}:${{ inputs.target_tag }}
282+
run: |
283+
podman build . -f third-party/ml-metadata/Dockerfile -t ${{ env.MLMD_GRPC }} && podman push ${{ env.MLMD_GRPC }}

0 commit comments

Comments
 (0)