@@ -28,27 +28,21 @@ branches+=("master")
28
28
clone_urls+=(" https://github.com/aws/eks-charts.git" )
29
29
30
30
for i in " ${! branches[@]} " ; do
31
- git clone --branch " ${branches[$i]} " " ${clone_urls[$i]} " $TMP_DIR /pr$i
32
- DIFF_OUTPUT=$( diff -r $TMP_DIR /pr$i /stable/aws-node-termination-handler $SCRIPTPATH /../../config/helm/aws-node-termination-handler)
33
- DIFF_ECODE=$?
34
- echo " $DIFF_OUTPUT " > $TMP_DIR /chart-diff-pr$i .txt
35
-
36
- if [[ $DIFF_ECODE -eq 0 ]]; then
37
- if [[ $i -eq 0 ]]; then
38
- echo " ✅ AWS Node Termination Handler helm chart is in-sync with the eks-charts repo!"
39
- else
40
- echo " ✅ AWS Node Termination Handler helm chart is in-sync with a PR (${clone_urls[$i]} -branch ${branches[$i]} ) in eks-charts repo!"
41
- fi
42
- exit 0
31
+ git clone --branch " ${branches[$i]} " " ${clone_urls[$i]} " $TMP_DIR /pr$i || continue
32
+ if [[ ! -d $TMP_DIR /pr$i /stable/aws-node-termination-handler ]]; then
33
+ continue
34
+ fi
35
+ diff -r $TMP_DIR /pr$i /stable/aws-node-termination-handler $SCRIPTPATH /../../config/helm/aws-node-termination-handler | tee $TMP_DIR /chart-diff-pr$i .txt || continue
36
+
37
+ if [[ $i -eq 0 ]]; then
38
+ echo " ✅ AWS Node Termination Handler helm chart is in-sync with the eks-charts repo!"
43
39
else
44
- echo " ===================================== DIFF ========================================================"
45
- echo " ${clone_urls[$i]} -branch ${branches[$i]} "
46
- echo " $DIFF_OUTPUT "
47
- echo " ===================================== END DIFF ===================================================="
40
+ echo " ✅ AWS Node Termination Handler helm chart is in-sync with a PR (${clone_urls[$i]} -branch ${branches[$i]} ) in eks-charts repo!"
48
41
fi
42
+ exit 0
49
43
done
50
44
51
- echo " ❌ The Helm chart is NOT in-sync with the eks-charts repo. The diff is printed above. Please make a PR to eks-charts before merging this code."
45
+ echo " ❌ The Helm chart is NOT in-sync with the eks-charts repo. Please make a PR to eks-charts before merging this code."
52
46
echo " Check $TMP_DIR for more details"
53
47
54
48
exit 1
0 commit comments