File tree Expand file tree Collapse file tree 4 files changed +10
-9
lines changed Expand file tree Collapse file tree 4 files changed +10
-9
lines changed Original file line number Diff line number Diff line change 1616 steps :
1717 - checkout
1818 - run :
19- command : |
20- git remote add k8s https://github.com/haproxytech/helm-charts
21- git fetch k8s master
22- ct lint --config .circleci/ct.yaml
19+ command : ct lint --config .circleci/ct.yaml
2320 install-charts :
2421 machine : true
2522 steps :
Original file line number Diff line number Diff line change 1- remote : k8s
2- target-branch : master
31chart-dirs : .
42helm-extra-args : --timeout 600s
Original file line number Diff line number Diff line change @@ -62,7 +62,7 @@ main() {
6262
6363 echo " Testing for chart repo changes"
6464 local changed
65- changed=$( docker_exec ct list-changed 2> /dev/null | grep -v " is not a valid chart directory" )
65+ changed=$( docker_exec ct list-changed | grep -v " is not a valid chart directory" )
6666 if [[ -z " ${changed} " ]]; then
6767 echo " No chart changes detected"
6868 return
Original file line number Diff line number Diff line change @@ -77,15 +77,21 @@ main() {
7777 readarray -t changed_charts <<< " $(git diff --find-renames --name-only " ${latest_tag_rev} " | grep '\.yaml$' | cut -d '/' -f 1 | sort -u)"
7878
7979 if [[ -n " ${changed_charts[*]} " ]]; then
80+ local release_pending=no
8081 for chart in " ${changed_charts[@]} " ; do
8182 if [[ -f " ${chart} /Chart.yaml" ]]; then
83+ release_pending=yes
8284 echo " Packaging chart ${chart} "
8385 package_chart " ${chart} "
8486 fi
8587 done
8688
87- release_charts
88- update_index
89+ if [[ " ${release_pending} " == " yes" ]]; then
90+ release_charts
91+ update_index
92+ else
93+ echo " Nothing to do. No chart changes detected."
94+ fi
8995 else
9096 echo " Nothing to do. No chart changes detected."
9197 fi
You can’t perform that action at this time.
0 commit comments