-
Notifications
You must be signed in to change notification settings - Fork 34
84 lines (69 loc) · 2.51 KB
/
lintcharts2.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
name: Additional Helm chart linting
# Like lintcharts.yaml, the other lint Helm chart workflow, this workflow uses kube-linter
# kube-linter checks Helm templates but it does not check what is contained in {{ define ... }} blocks
# This workflow builds on the other workflow by producing Kubernetes YAML files from the templates and running kube-linter on those files
# See iter8-tools/iter8#1452
# Only runs when charts have changed
# Lint Helm charts
# Use templates to create Kubernetes YAML files and lint them
on:
pull_request:
branches:
- master
paths:
- charts/**
jobs:
http:
name: Lint HTTP performance test
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v3
- name: Get modified files in the charts/iter8 folder
id: modified-files
uses: tj-actions/changed-files@v35
with:
files: charts/iter8
- uses: azure/setup-helm@v3
if: steps.modified-files.outputs.any_modified == 'true'
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Create Kubernetes YAML file
if: steps.modified-files.outputs.any_modified == 'true'
run: |
helm template charts/iter8 \
--set tasks={http} \
--set http.url=http://httpbin.default/get >> iter8.yaml
- name: Lint Kubernetes YAML file
if: steps.modified-files.outputs.any_modified == 'true'
uses: stackrox/kube-linter-action@v1
with:
directory: iter8.yaml
grpc:
name: Lint gRPC performance test
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v3
- name: Get modified files in the charts/iter8 folder
id: modified-files
uses: tj-actions/changed-files@v35
with:
files: charts/iter8
- uses: azure/setup-helm@v3
if: steps.modified-files.outputs.any_modified == 'true'
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Create Kubernetes YAML file
if: steps.modified-files.outputs.any_modified == 'true'
run: |
helm template charts/iter8 \
--set tasks={grpc} \
--set grpc.host="hello.default:50051" \
--set grpc.call="helloworld.Greeter.SayHello" \
--set grpc.protoURL="https://raw.githubusercontent.com/grpc/grpc-go/master/examples/helloworld/helloworld/helloworld.proto" >> iter8.yaml
- name: Lint Kubernetes YAML file
if: steps.modified-files.outputs.any_modified == 'true'
uses: stackrox/kube-linter-action@v1
with:
directory: iter8.yaml