Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .ci/helm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,9 @@ function ci::install_pulsar_chart() {
${CHARTS_HOME}/scripts/pulsar/upload_tls.sh -k ${CLUSTER} -d ${PULSAR_HOME}/.ci/tls
sleep 10

echo ${HELM} install --values ${value_file} ${CLUSTER} ${CHARTS_HOME}/pulsar
${HELM} template --values ${value_file} ${CLUSTER} ${CHARTS_HOME}/pulsar
${HELM} install --values ${value_file} ${CLUSTER} ${CHARTS_HOME}/pulsar
echo ${HELM} install --values ${value_file} ${CLUSTER} ${CHARTS_HOME}/charts/pulsar
${HELM} template --values ${value_file} ${CLUSTER} ${CHARTS_HOME}/charts/pulsar
${HELM} install --values ${value_file} ${CLUSTER} ${CHARTS_HOME}/charts/pulsar

echo "wait until broker is alive"
WC=$(${KUBECTL} get pods -n ${NAMESPACE} --field-selector=status.phase=Running | grep ${CLUSTER}-broker | wc -l)
Expand Down
34 changes: 22 additions & 12 deletions .ci/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,10 @@ BINDIR=`dirname "$0"`
CHARTS_HOME=`cd ${BINDIR}/..;pwd`
CHARTS_PKGS=${CHARTS_HOME}/.chart-packages
CHARTS_INDEX=${CHARTS_HOME}/.chart-index
CHARTS_REPO=${CHARTS_REPO:-"https://charts.streamnative.io"}
OWNER=${OWNER:-streamnative}
REPO=${REPO:-charts}
GITHUB_TOKEN=${GITHUB_TOKEN:-"UNSET"}
CHARTS_REPO=${CHARTS_REPO:-"https://pulsar.apache.org/charts/"}
OWNER=${OWNER:-apache}
REPO=${REPO:-pulsar-helm-chart}
PUBLISH_CHARTS=${PUBLISH_CHARTS:-"false"}
GITUSER=${GITUSER:-"UNSET"}
GITEMAIL=${GITEMAIL:-"UNSET"}

# hack/common.sh need this variable to be set
PULSAR_CHART_HOME=${CHARTS_HOME}
Expand Down Expand Up @@ -66,17 +63,30 @@ function release::update_chart_index() {
${CR} index -o ${OWNER} -r ${REPO} -t "${GITHUB_TOKEN}" -c ${CHARTS_REPO} --index-path /cr/.chart-index --package-path /cr/.chart-packages
}

function release::publish_charts() {
git config user.email "${GITEMAIL}"
git config user.name "${GITUSER}"
function release::git_setup() {
cat <<- EOF > $HOME/.netrc
machine github.com
login $GITHUB_ACTOR
password $GITHUB_TOKEN
machine api.github.com
login $GITHUB_ACTOR
password $GITHUB_TOKEN
EOF
chmod 600 $HOME/.netrc

git config --global user.email "$GITHUB_ACTOR@users.noreply.github.com"
git config --global user.name "$GITHUB_ACTOR"
}

function release::publish_charts() {
release::git_setup
git remote update
git fetch --all
git checkout gh-pages
cp --force ${CHARTS_INDEX}/index.yaml index.yaml
git add index.yaml
git commit --message="Publish new charts to ${CHARTS_REPO}" --signoff
git remote -v
git remote add sn https://${PULSARBOT_USER}:${GITHUB_TOKEN}@github.com/${OWNER}/${REPO}
git push sn gh-pages
git push --set-upstream origin gh-pages
}

# install cr
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/pulsar.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ on:
pull_request:
branches:
- '*'
paths:
- 'charts/pulsar/**'
jobs:
lint-test:
runs-on: ubuntu-latest
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/pulsar_bk_tls.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ on:
pull_request:
branches:
- '*'
paths:
- 'charts/pulsar/**'
jobs:
lint-test:
runs-on: ubuntu-latest
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/pulsar_broker_tls.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ on:
pull_request:
branches:
- '*'
paths:
- 'charts/pulsar/**'
jobs:
lint-test:
runs-on: ubuntu-latest
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/pulsar_function.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ on:
pull_request:
branches:
- '*'
paths:
- 'charts/pulsar/**'
jobs:
lint-test:
runs-on: ubuntu-latest
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/pulsar_image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ on:
pull_request:
branches:
- '*'
paths:
- 'charts/pulsar/**'
jobs:
lint-test:
runs-on: ubuntu-latest
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/pulsar_jwt_asymmetric.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ on:
pull_request:
branches:
- '*'
paths:
- 'charts/pulsar/**'
jobs:
lint-test:
runs-on: ubuntu-latest
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/pulsar_jwt_symmetric.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ on:
pull_request:
branches:
- '*'
paths:
- 'charts/pulsar/**'
jobs:
lint-test:
runs-on: ubuntu-latest
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/pulsar_tls.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ on:
pull_request:
branches:
- '*'
paths:
- 'charts/pulsar/**'
jobs:
lint-test:
runs-on: ubuntu-latest
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/pulsar_zk_tls.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ on:
pull_request:
branches:
- '*'
paths:
- 'charts/pulsar/**'
jobs:
lint-test:
runs-on: ubuntu-latest
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/pulsar_zkbk_tls.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ on:
pull_request:
branches:
- '*'
paths:
- 'charts/pulsar/**'
jobs:
lint-test:
runs-on: ubuntu-latest
Expand Down
10 changes: 3 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,19 +23,15 @@ on:
branches:
- master
jobs:
lint-test:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Install chart
env:
GITHUB_TOKEN: ${{ secrets.PULSARBOT_TOKEN }}
PULSARBOT_USER: ${{ secrets.PULSARBOT_USER }}
CHARTS_REPO: ${{ secrets.CHARTS_REPO }}
PUBLISH_CHARTS: ${{ secrets.PUBLISH_CHARTS }}
GITUSER: ${{ secrets.GITUSER }}
GITEMAIL: ${{ secrets.GITEMAIL }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PUBLISH_CHARTS: true
run: |
.ci/release.sh
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.