@@ -11,23 +11,23 @@ jobs:
11
11
steps :
12
12
- name : Checkout
13
13
uses : actions/checkout@v2
14
- - name : Get Istioctl
14
+ - name : get istio version
15
+ id : get-istio-version
15
16
run : |
16
- ISTIO_VERSION=$(yq eval '. | select(.kind == "Deployment") | .spec.template.spec.containers[0].image | split(":") | .[1] ' ./istio/operator/manifests .yaml)
17
+ ISTIO_VERSION=$(yq eval '.data.version ' ./clusters/my-cluster/istio-version .yaml)
17
18
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 -
19
+ - name : get istioctl uri
20
+ id : get-istioctl
21
+ uses : istio/get-istioctl@e9b2b82bc1cecf150ec6aee77ceee8c256f4faf4
22
+ with :
23
+ version : ${{ env.ISTIO_VERSION }}
24
+ - name : Get Istioctl
25
+ run : |
26
+ curl -o istioctl.tar.gz -fsLO ${{ steps.get-istioctl.outputs.istioctl-url }}
27
+ tar -xzf istioctl.tar.gz
28
+ ./istioctl version --remote=false
21
29
- name : Istioctl Analyze
22
30
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"
31
+ ./istioctl analyze -A --use-kube=false \
32
+ --failure-threshold ERROR \
33
+ $(find . -not -path "*/.git*/*" -not -path "*/clusters/*" -name "*.yaml" -type f)
0 commit comments