-
Notifications
You must be signed in to change notification settings - Fork 143
54 lines (51 loc) · 2.28 KB
/
chart.yaml
File metadata and controls
54 lines (51 loc) · 2.28 KB
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
# Copyright The Kubernetes Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# Helm lint + package + workflow artifact only. No OCI/registry push — Prow owns chart publishing.
on:
workflow_call:
workflow_dispatch:
permissions:
contents: read
jobs:
helm:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
name: checkout
with:
fetch-depth: 2
- name: Install Helm
run: |
curl -sSfLO --retry 8 --retry-all-errors --connect-timeout 10 --retry-delay 5 \
https://get.helm.sh/helm-v3.18.6-linux-amd64.tar.gz
tar -zxvf helm-v3*amd64.tar.gz && sudo mv linux-amd64/helm /usr/local/bin/helm
- name: helm lint
run: make helm-lint
- name: build-chart
run: |
export VERSION="$(make print-VERSION)"
export VERSION_W_COMMIT="$(make print-VERSION)-$(echo $GITHUB_SHA | cut -c1-8)"
# Drop leading 'v'.
echo "replace ${VERSION:1} with ${VERSION_W_COMMIT:1}"
sed -i "s/${VERSION:1}/${VERSION_W_COMMIT:1}-chart/g" deployments/helm/dra-driver-nvidia-gpu/Chart.yaml
sed -i "s/tag: \"\"/tag: \"${VERSION_W_COMMIT}\"/g" deployments/helm/dra-driver-nvidia-gpu/values.yaml
# Staging image registry for CI-built images.
sed -i 's|registry.k8s.io/dra-driver-nvidia|us-central1-docker.pkg.dev/k8s-staging-images/dra-driver-nvidia|g' deployments/helm/dra-driver-nvidia-gpu/values.yaml
git diff || echo "ignore git diff exit code"
helm package deployments/helm/dra-driver-nvidia-gpu
- name: Upload chart package
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
with:
name: helm-chart
path: dra-driver-nvidia-gpu-*.tgz