Skip to content

Commit 4254854

Browse files
committed
chore(ci): begin building Dockerfile.konflux.* images based on AIPCC bases in red-hat-data-services
* add new checkboxes to let user choose Dockerfile.konflux.* in on-demand build * fixup, env is not allowed in workflow YAML composite action, have to use input parameter
1 parent 3759743 commit 4254854

File tree

3 files changed

+34
-2
lines changed

3 files changed

+34
-2
lines changed

.github/workflows/build-notebooks-TEMPLATE.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,11 @@ name: Build & Publish Notebook Servers (TEMPLATE)
2828
default: false
2929
description: "add RHEL subscription from github secret"
3030
type: boolean
31+
konflux:
32+
required: false
33+
default: false
34+
description: "build from Dockerfile.konflux.* instead of Dockerfile.*"
35+
type: boolean
3136
PLATFORM_RUNNERS:
3237
required: false
3338
# language=json
@@ -260,6 +265,7 @@ jobs:
260265
CONTAINER_BUILD_CACHE_ARGS: "${{ steps.extra-container-build-args.outputs.CONTAINER_BUILD_CACHE_ARGS }}"
261266
# We don't have access to image registry for PRs, so disable pushing
262267
PUSH_IMAGES: "${{ (fromJson(inputs.github).event_name == 'pull_request' || fromJson(inputs.github).event_name == 'pull_request_target') && 'no' || 'yes' }}"
268+
KONFLUX: "${{ inputs.konflux && 'yes' || 'no' }}"
263269

264270
- name: "Show podman images information"
265271
run: podman images --digests

.github/workflows/build-notebooks-pr-aipcc.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,4 +95,5 @@ jobs:
9595
platform: "${{ matrix.platform }}"
9696
# rhds/notebooks builds from AIPCC base images that are RHEL-based
9797
subscription: ${{ true }}
98+
konflux: ${{ true }}
9899
secrets: inherit

.github/workflows/build-notebooks-push.yaml

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,15 @@
99
# In fact, skip the build if there are only changes in manifests and nowhere else
1010
- manifests/**
1111
"workflow_dispatch":
12+
inputs:
13+
"odh":
14+
description: "Build Dockerfile.*"
15+
type: boolean
16+
default: false
17+
"rhds":
18+
description: "Build Dockerfile.konflux.* (requires subscription)"
19+
type: boolean
20+
default: false
1221
"schedule":
1322
- "cron": "0 2 * * *"
1423

@@ -52,12 +61,28 @@ jobs:
5261
fail-fast: false
5362
matrix: "${{ fromJson(needs.gen.outputs.matrix) }}"
5463
uses: ./.github/workflows/build-notebooks-TEMPLATE.yaml
55-
if: ${{ fromJson(needs.gen.outputs.has_jobs) }}
64+
if: ${{ (inputs.odh || (github.event_name != 'workflow_dispatch' && github.repository != 'red-hat-data-services/notebooks')) && fromJson(needs.gen.outputs.has_jobs) }}
65+
with:
66+
target: "${{ matrix.target }}"
67+
python: "${{ matrix.python }}"
68+
github: "${{ toJSON(github) }}"
69+
platform: "${{ matrix.platform }}"
70+
subscription: "${{ matrix.subscription }}"
71+
secrets: inherit
72+
73+
build-aipcc:
74+
needs: ["gen"]
75+
strategy:
76+
fail-fast: false
77+
matrix: "${{ fromJson(needs.gen.outputs.matrix) }}"
78+
uses: ./.github/workflows/build-notebooks-TEMPLATE.yaml
79+
if: ${{ (inputs.rhds || (github.event_name != 'workflow_dispatch' && github.repository == 'red-hat-data-services/notebooks')) && fromJson(needs.gen.outputs.has_jobs) }}
5680
with:
5781
target: "${{ matrix.target }}"
5882
python: "${{ matrix.python }}"
5983
github: "${{ toJSON(github) }}"
6084
platform: "${{ matrix.platform }}"
6185
# rhds/notebooks builds from AIPCC base images that are RHEL-based
62-
subscription: "${{ matrix.subscription || (github.repository == 'red-hat-data-services/notebooks') }}"
86+
subscription: ${{ true }}
87+
konflux: ${{ true }}
6388
secrets: inherit

0 commit comments

Comments
 (0)