move remove-test to function
This commit is contained in:
@@ -255,20 +255,24 @@ jobs:
|
|||||||
|
|
||||||
- name: Remove if release already exists
|
- name: Remove if release already exists
|
||||||
run: |
|
run: |
|
||||||
for train in stable incubator develop non-free deprecated
|
removetask(){
|
||||||
do
|
if [ -d "$2/SCALE" ]; then
|
||||||
for chart in master/charts/${train}/*; do
|
maxchartversion=$(cat $2/Chart.yaml | grep "^version: " | awk -F" " '{ print $2 }')
|
||||||
if [ -d "${chart}/SCALE" ]; then
|
chartname=$(basename $2)
|
||||||
maxchartversion=$(cat ${chart}/Chart.yaml | grep "^version: " | awk -F" " '{ print $2 }')
|
|
||||||
chartname=$(basename ${chart})
|
|
||||||
echo "Processing... cleanup-existing... Chart: ${chartname} - Version: ${maxchartversion}"
|
echo "Processing... cleanup-existing... Chart: ${chartname} - Version: ${maxchartversion}"
|
||||||
rm -Rf catalog/${train}/${chartname}/${maxchartversion} || echo "Chart release ${chartname} with version ${maxchartversion} does not exist yet... Skipping..."
|
rm -Rf catalog/$1/${chartname}/${maxchartversion} || echo "Chart release ${chartname} with version ${maxchartversion} does not exist yet... Skipping..."
|
||||||
rm -Rf catalog/${train}/${chartname}/item.yaml || echo "No old catalog item.yaml found for ${chartname}"
|
rm -Rf catalog/$1/${chartname}/item.yaml || echo "No old catalog item.yaml found for ${chartname}"
|
||||||
else
|
else
|
||||||
echo "Skipping chart ${chart}, no correct SCALE compatibility layer detected"
|
echo "Skipping chart ${chart}, no correct SCALE compatibility layer detected"
|
||||||
fi
|
fi
|
||||||
|
}
|
||||||
|
for train in stable incubator develop non-free deprecated
|
||||||
|
do
|
||||||
|
for chart in master/charts/${train}/*; do
|
||||||
|
removetask "${train}" "${chart}"
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
|
wait
|
||||||
- name: fetch dependencies
|
- name: fetch dependencies
|
||||||
run: |
|
run: |
|
||||||
for train in stable incubator develop non-free deprecated
|
for train in stable incubator develop non-free deprecated
|
||||||
|
|||||||
Reference in New Issue
Block a user