Skip to content

Commit 48cfadb

Browse files
committed
Add workflows for kubeflow components testing and release
1 parent 4e9112e commit 48cfadb

File tree

3 files changed

+116
-0
lines changed

3 files changed

+116
-0
lines changed
Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
name: Kubeflow Components Tests
2+
3+
on:
4+
pull_request:
5+
paths:
6+
- 'build/dockerfiles/kubeflow-components/**'
7+
- '.github/workflows/kubeflow-components-test.yaml'
8+
push:
9+
branches:
10+
- main
11+
paths:
12+
- 'build/dockerfiles/kubeflow-components/**'
13+
- '.github/workflows/kubeflow-components-test.yaml'
14+
15+
jobs:
16+
test-scripts:
17+
name: Run BATS tests
18+
runs-on: ubuntu-latest
19+
steps:
20+
- name: Checkout code
21+
uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1
22+
23+
- name: Install BATS
24+
run: |
25+
sudo apt-get update
26+
sudo apt-get install -y bats
27+
28+
- name: Install jq
29+
run: |
30+
sudo apt-get install -y jq
31+
32+
- name: Run push-modelkit tests
33+
working-directory: build/dockerfiles/kubeflow-components
34+
run: bats tests/push-modelkit.bats
35+
36+
- name: Run unpack-modelkit tests
37+
working-directory: build/dockerfiles/kubeflow-components
38+
run: bats tests/unpack-modelkit.bats
39+
40+
test-container-build:
41+
name: Test container build
42+
runs-on: ubuntu-latest
43+
steps:
44+
- name: Set up QEMU
45+
uses: docker/setup-qemu-action@c7c53464625b32c7a7e944ae62b3e17d2b600130 # v3.7.0
46+
47+
- name: Set up Docker Buildx
48+
uses: docker/setup-buildx-action@e468171a9de216ec08956ac3ada2f0791b6bd435 # v3.11.1
49+
50+
- name: Checkout
51+
uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1
52+
53+
- name: Build base kit container (for build-arg)
54+
id: build-kit-base
55+
uses: docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 # v6.18.0
56+
with:
57+
platforms: linux/amd64
58+
push: false
59+
context: .
60+
file: build/dockerfiles/Dockerfile
61+
load: true
62+
tags: ghcr.io/kitops-ml/kitops:test
63+
64+
- name: Check kubeflow components container build
65+
uses: docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 # v6.18.0
66+
with:
67+
platforms: linux/amd64,linux/arm64
68+
push: false
69+
context: build/dockerfiles/kubeflow-components
70+
file: build/dockerfiles/kubeflow-components/Dockerfile
71+
build-args: |
72+
KIT_BASE_IMAGE=ghcr.io/kitops-ml/kitops:test

.github/workflows/next-container-build.yaml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ env:
1212
IMAGE_NAME: ${{ github.repository }}
1313
INIT_IMAGE_NAME: ${{ github.repository }}-init
1414
KIT_SERVE_IMAGE: ${{ github.repository }}-kserve
15+
KUBEFLOW_IMAGE: ${{ github.repository }}-kubeflow
1516
NEXT_TAG: next
1617

1718
permissions:
@@ -90,3 +91,20 @@ jobs:
9091
index:org.opencontainers.image.description=KitOps KServe container
9192
index:org.opencontainers.image.source=https://github.com/kitops-ml/kitops
9293
index:org.opencontainers.image.licenses=Apache-2.0
94+
95+
- name: Build and push Kubeflow Pipeline components container
96+
id: build-kubeflow-container
97+
uses: docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 # v6.18.0
98+
with:
99+
platforms: linux/amd64,linux/arm64
100+
push: true
101+
context: build/dockerfiles/kubeflow-components
102+
file: build/dockerfiles/kubeflow-components/Dockerfile
103+
build-args: |
104+
KIT_BASE_IMAGE=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}@${{ steps.build-kit-container.outputs.digest }}
105+
tags: |
106+
${{ env.REGISTRY }}/${{ env.KUBEFLOW_IMAGE }}:${{ env.NEXT_TAG }}
107+
annotations: |
108+
index:org.opencontainers.image.description=KitOps Kubeflow Pipeline Components
109+
index:org.opencontainers.image.source=https://github.com/kitops-ml/kitops
110+
index:org.opencontainers.image.licenses=Apache-2.0

.github/workflows/platform-release.yaml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ env:
2121
IMAGE_NAME: ${{ github.repository }}
2222
INIT_IMAGE_NAME: ${{ github.repository }}-init
2323
KIT_SERVE_IMAGE: ${{ github.repository }}-kserve
24+
KUBEFLOW_IMAGE: ${{ github.repository }}-kubeflow
2425

2526
permissions:
2627
contents: write
@@ -431,6 +432,24 @@ jobs:
431432
index:org.opencontainers.image.source=https://github.com/kitops-ml/kitops
432433
index:org.opencontainers.image.licenses=Apache-2.0
433434
435+
- name: Build and push Kubeflow Pipeline components container
436+
id: build-kubeflow-container
437+
uses: docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 # v6.18.0
438+
with:
439+
platforms: linux/amd64,linux/arm64
440+
push: true
441+
context: build/dockerfiles/kubeflow-components
442+
file: build/dockerfiles/kubeflow-components/Dockerfile
443+
build-args: |
444+
KIT_BASE_IMAGE=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}@${{ steps.build-kit-container.outputs.digest }}
445+
tags: |
446+
${{ env.REGISTRY }}/${{ env.KUBEFLOW_IMAGE }}:latest
447+
${{ env.REGISTRY }}/${{ env.KUBEFLOW_IMAGE }}:${{ github.ref_name }}
448+
annotations: |
449+
index:org.opencontainers.image.description=KitOps Kubeflow Pipeline Components
450+
index:org.opencontainers.image.source=https://github.com/kitops-ml/kitops
451+
index:org.opencontainers.image.licenses=Apache-2.0
452+
434453
- name: Generate artifact attestation for base container
435454
uses: actions/attest-build-provenance@977bb373ede98d70efdf65b84cb5f73e068dcc2a # v3.0.0
436455
with:
@@ -451,3 +470,10 @@ jobs:
451470
subject-name: ${{ env.REGISTRY }}/${{ env.KIT_SERVE_IMAGE }}
452471
subject-digest: ${{ steps.build-kit-serve-container.outputs.digest }}
453472
push-to-registry: true
473+
474+
- name: Generate artifact attestation for kubeflow container
475+
uses: actions/attest-build-provenance@977bb373ede98d70efdf65b84cb5f73e068dcc2a # v3.0.0
476+
with:
477+
subject-name: ${{ env.REGISTRY }}/${{ env.KUBEFLOW_IMAGE }}
478+
subject-digest: ${{ steps.build-kubeflow-container.outputs.digest }}
479+
push-to-registry: true

0 commit comments

Comments
 (0)