File tree Expand file tree Collapse file tree 1 file changed +33
-0
lines changed Expand file tree Collapse file tree 1 file changed +33
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : analyze-istio
2
+
3
+ on :
4
+ workflow_dispatch :
5
+ pull_request :
6
+ push :
7
+
8
+ jobs :
9
+ check-istio :
10
+ runs-on : ubuntu-latest
11
+ steps :
12
+ - name : Checkout
13
+ uses : actions/checkout@v2
14
+ - name : Get Istioctl
15
+ run : |
16
+ ISTIO_VERSION=$(yq eval '. | select(.kind == "Deployment") | .spec.template.spec.containers[0].image | split(":") | .[1]' ./istio/operator/manifests.yaml)
17
+ echo "ISTIO_VERSION=$ISTIO_VERSION" >> $GITHUB_ENV
18
+ # downloadIstio will now retrieve the currently installed binary, instead of latest
19
+ echo "Downloading Istio (v${ISTIO_VERSION})"
20
+ curl -sL https://istio.io/downloadIstio | ISTIO_VERSION=$ISTIO_VERSION sh -
21
+ - name : Istioctl Analyze
22
+ run : |
23
+ # this command will exit(1) if an error is found in any yaml
24
+ # istio/operator/manifests.yaml contains an empty yaml doc, which
25
+ # throws off analyze, so pass it in separately
26
+ MANIFESTS=$(yq eval '. | select(. | has("kind"))' ./istio/operator/manifests.yaml)
27
+
28
+ ISTIO_VERSION=${{ env.ISTIO_VERSION }}
29
+
30
+ ./istio-${ISTIO_VERSION}/bin/istioctl analyze -A --use-kube=false \
31
+ --failure-threshold ERROR $(find . -not -path "*/istio-$ISTIO_VERSION/*" \
32
+ -not -path "*/.git*/*" -not -path "*/clusters/*" -name "*.yaml" \
33
+ -not -path "*/istio/operator/manifests.yaml" -type f) -<<<"$MANIFESTS"
You can’t perform that action at this time.
0 commit comments