mirror of
https://github.com/prometheus-operator/prometheus-operator.git
synced 2025-04-21 03:38:43 +00:00
Update sync-repo.sh
This commit is contained in:
parent
2604472963
commit
ed05398035
1 changed files with 3 additions and 5 deletions
|
@ -11,7 +11,7 @@ AWS_REGION=${3:-"eu-west-1"}
|
|||
#Check if the current chart has the same hash from the remote one
|
||||
for tgz in $(ls ${HELM_CHARTS_PACKAGED_DIR})
|
||||
do
|
||||
if [ "${tgz}" != "kube-prometheus"* ]
|
||||
if echo "${tgz}" | grep -vq "kube-prometheus"
|
||||
then # if remote file doesn't exist we can skip the comparison
|
||||
status_code=$(curl -s -o /dev/null -w "%{http_code}" https://s3-eu-west-1.amazonaws.com/${HELM_BUCKET_NAME}/stable/${tgz})
|
||||
if [ "$status_code" == "200" ]
|
||||
|
@ -23,10 +23,8 @@ do
|
|||
echo "ERROR: Current hash should be the same as the remote hash. Please bump the version of chart {$tgz}."
|
||||
exit 1
|
||||
fi
|
||||
else
|
||||
echo "File ${tgz} does not exist "
|
||||
fi
|
||||
done
|
||||
fi
|
||||
done
|
||||
|
||||
# sync charts
|
||||
|
@ -35,4 +33,4 @@ then
|
|||
aws s3 sync --acl public-read ${HELM_CHARTS_PACKAGED_DIR} s3://${HELM_BUCKET_NAME}/stable/
|
||||
fi
|
||||
|
||||
exit 0
|
||||
exit 0
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue