|
1 | 1 | version: "3" |
2 | 2 |
|
3 | 3 | includes: |
| 4 | + remote: "../tools/yscope-dev-utils/exports/taskfiles/utils/remote.yaml" |
4 | 5 | utils: "../tools/yscope-dev-utils/exports/taskfiles/utils/utils.yaml" |
5 | 6 |
|
6 | 7 | vars: |
| 8 | + G_HELM_TOOLCHAIN_DIR: "{{.G_BUILD_DIR}}/toolchains/helm" |
| 9 | + G_HELM_TOOLCHAIN_ENV_FILE: "{{.G_HELM_TOOLCHAIN_DIR}}/env" |
7 | 10 | G_RUST_TOOLCHAIN_DIR: "{{.G_BUILD_DIR}}/toolchains/rust" |
8 | 11 | G_RUST_TOOLCHAIN_ENV_FILE: "{{.G_RUST_TOOLCHAIN_DIR}}/env" |
9 | 12 |
|
|
15 | 18 | G_RUST_TOOLCHAIN_CHECKSUM_FILE: "{{.G_BUILD_DIR}}/toolchains-rust.md5" |
16 | 19 |
|
17 | 20 | tasks: |
| 21 | + helm: |
| 22 | + vars: |
| 23 | + CHART_TESTING_VERSION: "3.14.0" |
| 24 | + HELM_VERSION: "v4.2.3" |
| 25 | + run: "once" |
| 26 | + cmds: |
| 27 | + - "mkdir -p '{{.G_HELM_TOOLCHAIN_DIR}}'" |
| 28 | + - task: "remote:download-and-extract-tar" |
| 29 | + vars: |
| 30 | + OUTPUT_DIR: "{{.G_HELM_TOOLCHAIN_DIR}}" |
| 31 | + URL: "https://github.com/helm/chart-testing/releases/download/v{{.CHART_TESTING_VERSION}}\ |
| 32 | + /chart-testing_{{.CHART_TESTING_VERSION}}_{{OS}}_{{ARCH}}.tar.gz" |
| 33 | + FILE_SHA256: >- |
| 34 | + {{- if and (eq OS "linux") (eq ARCH "amd64") -}} |
| 35 | + d16f0583616885423826241164ce1f6589c6fe5332fa74f374ebd2bd3cb3fe1f |
| 36 | + {{- else if and (eq OS "linux") (eq ARCH "arm64") -}} |
| 37 | + 7b035bbbd0768fba33983e81c15445e33e9c8281d329100852a342ecfd0b16b7 |
| 38 | + {{- else if and (eq OS "darwin") (eq ARCH "arm64") -}} |
| 39 | + db10dbbb42b110c7a5da5a3202908f32ad2ca6ad600d423426dc7886d09aad07 |
| 40 | + {{- else -}} |
| 41 | + unsupported |
| 42 | + {{- end }} |
| 43 | + INCLUDE_PATTERNS: ["ct", "etc/chart_schema.yaml"] |
| 44 | + NUM_COMPONENTS_TO_STRIP: "0" |
| 45 | + - |- |
| 46 | + export PATH="{{.G_HELM_TOOLCHAIN_DIR}}:$PATH" |
| 47 | + export HELM_INSTALL_DIR="{{.G_HELM_TOOLCHAIN_DIR}}" |
| 48 | + curl --proto "=https" --tlsv1.2 --silent --show-error --fail \ |
| 49 | + https://raw.githubusercontent.com/helm/helm/{{.HELM_VERSION}}/scripts/get-helm-4 \ |
| 50 | + | bash -s -- --no-sudo --version "{{.HELM_VERSION}}" |
| 51 | +
|
| 52 | + # Create an environment file to configure the custom Helm toolchain location. |
| 53 | + - |- |
| 54 | + cat <<"EOF" > "{{.G_HELM_TOOLCHAIN_ENV_FILE}}" |
| 55 | + #!/bin/sh |
| 56 | + export PATH="{{.G_HELM_TOOLCHAIN_DIR}}:$PATH" |
| 57 | + EOF |
| 58 | +
|
18 | 59 | rust: |
19 | 60 | # We use a label to uniquely identify this task and its checksum under `.task/checksums/`. |
20 | 61 | label: "toolchains-rust" |
|
0 commit comments