-
Notifications
You must be signed in to change notification settings - Fork 3
100 lines (91 loc) · 4.48 KB
/
dev_spark-k8s-with-scikit-learn.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
---
name: Build and publish spark-k8s-with-scikit-learn
env:
IMAGE_NAME: spark-k8s-with-scikit-learn
# TODO (@NickLarsenNZ): Use a versioned image with stackable0.0.0-dev or stackableXX.X.X so that
# the demo is reproducable for the release and it will be automatically replaced for the release branch.
IMAGE_VERSION: 3.5.0-stackable24.3.0
REGISTRY_PATH: stackable
DOCKERFILE_PATH: "demos/jupyterhub-pyspark-hdfs-anomaly-detection-taxi-data/Dockerfile"
on:
workflow_dispatch:
push:
branches:
- main
# TODO (@NickLarsenNZ): Also build on release branches, but with a stackable0.0.0-dev or stackableXX.X.X tag.
# - release-*
paths:
- demos/jupyterhub-pyspark-hdfs-anomaly-detection-taxi-data/Dockerfile
- demos/jupyterhub-pyspark-hdfs-anomaly-detection-taxi-data/requirements.txt
- .github/workflows/dev_spark-k8s-with-scikit-learn.yaml
jobs:
build:
name: Build/Publish ${{ matrix.runner.arch }} Image
permissions:
id-token: write
runs-on: ${{ matrix.runner.name }}
strategy:
matrix:
runner:
- {name: "ubuntu-latest", arch: "amd64"}
# TODO: the image 3.5.0-stackable24.3.0 does not have an arm64 build.
# Re-activate the arm runner when the image is updated to one that does.
# Also adjust publish_manifest step to include arm architecture
# - {name: "ubicloud-standard-8-arm", arch: "arm64"}
steps:
- name: Checkout Repository
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: Build image
id: build
uses: stackabletech/actions/build-container-image@013e6482fbc0edf2d38cf9220fc931f6a81336fb # v0.0.6
with:
image-name: ${{ env.IMAGE_NAME }}
image-index-manifest-tag: ${{ env.IMAGE_VERSION }}
container-file: ${{ env.DOCKERFILE_PATH }}
- name: Publish Container Image on docker.stackable.tech
uses: stackabletech/actions/publish-image@013e6482fbc0edf2d38cf9220fc931f6a81336fb # v0.0.6
with:
image-registry-uri: docker.stackable.tech
image-registry-username: github
image-registry-password: ${{ secrets.NEXUS_PASSWORD }}
image-repository: demos/${{ env.IMAGE_NAME }}
image-manifest-tag: ${{ steps.build.outputs.image-manifest-tag }}
source-image-uri: ${{ steps.build.outputs.image-manifest-uri }}
- name: Publish Container Image on oci.stackable.tech
uses: stackabletech/actions/publish-image@013e6482fbc0edf2d38cf9220fc931f6a81336fb # v0.0.6
with:
image-registry-uri: oci.stackable.tech
image-registry-username: robot$stackable+github-action-build
image-registry-password: ${{ secrets.HARBOR_ROBOT_STACKABLE_GITHUB_ACTION_BUILD_SECRET }}
image-repository: ${{ env.REGISTRY_PATH }}/${{ env.IMAGE_NAME }}
image-manifest-tag: ${{ steps.build.outputs.image-manifest-tag }}
source-image-uri: ${{ steps.build.outputs.image-manifest-uri }}
publish_manifests:
name: Build/Publish Manifest
needs: [build]
permissions:
id-token: write
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
# TODO: remove image-architecture key once arm image is also built
- name: Publish and Sign Image Index Manifest to docker.stackable.tech
uses: stackabletech/actions/publish-index-manifest@013e6482fbc0edf2d38cf9220fc931f6a81336fb # v0.0.6
with:
image-registry-uri: docker.stackable.tech
image-registry-username: github
image-registry-password: ${{ secrets.NEXUS_PASSWORD }}
image-repository: demos/${{ env.IMAGE_NAME }}
image-index-manifest-tag: ${{ env.IMAGE_VERSION }}
image-architectures: '["amd64"]'
# TODO: remove image-architecture key once arm image is also built
- name: Publish and Sign Image Index Manifest to oci.stackable.tech
uses: stackabletech/actions/publish-index-manifest@013e6482fbc0edf2d38cf9220fc931f6a81336fb # v0.0.6
with:
image-registry-uri: oci.stackable.tech
image-registry-username: robot$stackable+github-action-build
image-registry-password: ${{ secrets.HARBOR_ROBOT_STACKABLE_GITHUB_ACTION_BUILD_SECRET }}
image-repository: ${{ env.REGISTRY_PATH }}/${{ env.IMAGE_NAME }}
image-index-manifest-tag: ${{ env.IMAGE_VERSION }}
image-architectures: '["amd64"]'