Skip to content

Commit ffb638e

Browse files
Tyler Titsworthsharvil10
Tyler Titsworth
andauthored
Use Chart Testing Composite (#116)
Signed-off-by: Tyler Titsworth <tyler.titsworth@intel.com> Co-authored-by: Sharvil Shah <sharvil.shah@intel.com>
1 parent 3dd3db5 commit ffb638e

File tree

3 files changed

+19
-23
lines changed

3 files changed

+19
-23
lines changed

.github/workflows/chart-ci.yaml

+2-21
Original file line numberDiff line numberDiff line change
@@ -42,25 +42,6 @@ jobs:
4242
with:
4343
fetch-depth: 0
4444
ref: ${{ github.event.merge_group.head_ref }}
45-
- uses: azure/setup-kubectl@3e0aec4d80787158d308d7b364cb1b702e7feb7f # v4.0.0
46-
- uses: azure/setup-helm@fe7b79cd5ee1e45176fcad797de68ecaf3ca4814 # v4.2.0
47-
- uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0
45+
- uses: intel/ai-containers/workflows/charts@3dd3db546b10d1a29f17a4fc45d4c5b7ca950c90 # main
4846
with:
49-
python-version: 3.x
50-
- name: Setup chart-testing
51-
uses: helm/chart-testing-action@e6669bcd63d7cb57cb4380c33043eebe5d111992 # v2.6.1
52-
- name: Get chart diff
53-
id: changed
54-
run: |
55-
changed=$(ct list-changed --target-branch ${{ github.event.repository.default_branch }} --config .github/ct.yaml)
56-
if [[ -n "$changed" ]]; then
57-
echo "changed=true" >> "$GITHUB_OUTPUT"
58-
fi
59-
- name: Helm Lint, Install, and Test
60-
if: steps.changed.outputs.changed == 'true'
61-
run: |
62-
install -m 0600 ${{ secrets.KUBECONFIG_PATH }} /tmp/config.yaml
63-
kubectl config use-context kubeflow
64-
ct lint-and-install --target-branch ${{ github.event.repository.default_branch }} --config .github/ct.yaml --debug --namespace helm-ci
65-
env:
66-
KUBECONFIG: /tmp/config.yaml
47+
kubeconfig_path: ${{ secrets.KUBECONFIG_PATH }}

.github/workflows/integration-test.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ jobs:
6868
group: ${{ fromJson(needs.group-diff.outputs.groups) }}
6969
experimental: [true]
7070
fail-fast: false
71-
uses: ./.github/workflows/container-ci.yaml
71+
uses: intel/ai-containers/.github/workflows/container-ci.yaml@3dd3db546b10d1a29f17a4fc45d4c5b7ca950c90 # main
7272
with:
7373
group_dir: ${{ matrix.group }}
7474
ref: "refs/pull/${{ github.event.number }}/merge"

.github/workflows/weekly-test.yaml

+16-1
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,26 @@ jobs:
4747
group: ${{ fromJson(needs.get-groups.outputs.groups) }}
4848
experimental: [true]
4949
fail-fast: false
50-
uses: ./.github/workflows/container-ci.yaml
50+
uses: intel/ai-containers/.github/workflows/container-ci.yaml@3dd3db546b10d1a29f17a4fc45d4c5b7ca950c90 # main
5151
with:
5252
group_dir: ${{ matrix.group }}
5353
ref: main
5454
secrets: inherit
55+
helm-ci:
56+
runs-on: kubectl
57+
steps:
58+
- name: Harden Runner
59+
uses: step-security/harden-runner@f086349bfa2bd1361f7909c78558e816508cdc10 # v2.8.0
60+
with:
61+
egress-policy: audit
62+
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
63+
with:
64+
fetch-depth: 0
65+
- uses: intel/ai-containers/workflows/charts@3dd3db546b10d1a29f17a4fc45d4c5b7ca950c90 # main
66+
with:
67+
config: '--all --namespace helm-ci'
68+
list_changed: false
69+
kubeconfig_path: ${{ secrets.KUBECONFIG_PATH }}
5570
scan:
5671
name: gitleaks
5772
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)