[Build] Publish charts to apache/pulsar-site branch asf-site-next (#232)
- also use shallow cloning
This commit is contained in:
parent
9613ee0292
commit
5b90c5195c
@ -27,6 +27,8 @@ CHARTS_REPO=${CHARTS_REPO:-"https://pulsar.apache.org/charts/"}
|
||||
OWNER=${OWNER:-apache}
|
||||
REPO=${REPO:-pulsar-helm-chart}
|
||||
PUBLISH_CHARTS=${PUBLISH_CHARTS:-"false"}
|
||||
PULSAR_SITE_REPO_SLUG=${PULSAR_SITE_REPO_SLUG:-"apache/pulsar-site"}
|
||||
PULSAR_SITE_BRANCH=${PULSAR_SITE_BRANCH:-"asf-site-next"}
|
||||
|
||||
# hack/common.sh need this variable to be set
|
||||
PULSAR_CHART_HOME=${CHARTS_HOME}
|
||||
@ -71,16 +73,15 @@ function release::git_setup() {
|
||||
|
||||
function release::publish_charts() {
|
||||
release::git_setup
|
||||
git clone https://${GITHUB_TOKEN}@github.com/apache/pulsar
|
||||
cd pulsar
|
||||
git checkout asf-site
|
||||
git clone -b "$PULSAR_SITE_BRANCH" --depth 1 "https://${GITHUB_TOKEN}@github.com/${PULSAR_SITE_REPO_SLUG}" pulsar-site
|
||||
cd pulsar-site
|
||||
mkdir -p content/charts
|
||||
cp --force ${CHARTS_INDEX}/index.yaml content/charts/index.yaml
|
||||
git add content/charts/index.yaml
|
||||
ls content/charts
|
||||
git commit --message="Publish new charts to ${CHARTS_REPO}" --signoff
|
||||
if [[ "x${PUBLISH_CHARTS}" == "xtrue" ]]; then
|
||||
git push --set-upstream origin asf-site
|
||||
git push --set-upstream origin "$PULSAR_SITE_BRANCH"
|
||||
else
|
||||
echo "Skipping publishing charts"
|
||||
fi
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user