parent
1c8a434ef6
commit
93d8fd1981
@ -64,29 +64,25 @@ function release::update_chart_index() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function release::git_setup() {
|
function release::git_setup() {
|
||||||
cat <<- EOF > $HOME/.netrc
|
git config --global user.email "dev@pulsar.apache.org"
|
||||||
machine github.com
|
git config --global user.name "Apache Pulsar Team"
|
||||||
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() {
|
function release::publish_charts() {
|
||||||
release::git_setup
|
release::git_setup
|
||||||
git remote update
|
git clone https://${GITHUB_TOKEN}@github.com/apache/pulsar
|
||||||
git fetch --all
|
cd pulsar
|
||||||
git checkout gh-pages
|
git checkout asf-site
|
||||||
cp --force ${CHARTS_INDEX}/index.yaml index.yaml
|
mkdir -p content/charts
|
||||||
git add index.yaml
|
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
|
git commit --message="Publish new charts to ${CHARTS_REPO}" --signoff
|
||||||
git push --set-upstream origin gh-pages
|
if [[ "x${PUBLISH_CHARTS}" == "xtrue" ]]; then
|
||||||
|
git push --set-upstream origin asf-site
|
||||||
|
else
|
||||||
|
git push --dry-run --set-upstream origin asf-site
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
# install cr
|
# install cr
|
||||||
@ -116,7 +112,4 @@ done
|
|||||||
|
|
||||||
release::upload_packages
|
release::upload_packages
|
||||||
release::update_chart_index
|
release::update_chart_index
|
||||||
|
release::publish_charts
|
||||||
if [[ "x${PUBLISH_CHARTS}" == "xtrue" ]]; then
|
|
||||||
release::publish_charts
|
|
||||||
fi
|
|
||||||
|
|||||||
4
.github/workflows/release.yml
vendored
4
.github/workflows/release.yml
vendored
@ -28,10 +28,12 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
token: ${{ secrets.PULSARBOT_TOKEN }}
|
||||||
|
|
||||||
- name: Install chart
|
- name: Install chart
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.PULSARBOT_TOKEN }}
|
||||||
PUBLISH_CHARTS: true
|
PUBLISH_CHARTS: true
|
||||||
run: |
|
run: |
|
||||||
.ci/release.sh
|
.ci/release.sh
|
||||||
|
|||||||
39
.github/workflows/verify_release.yml
vendored
Normal file
39
.github/workflows/verify_release.yml
vendored
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
#
|
||||||
|
# Licensed to the Apache Software Foundation (ASF) under one
|
||||||
|
# or more contributor license agreements. See the NOTICE file
|
||||||
|
# distributed with this work for additional information
|
||||||
|
# regarding copyright ownership. The ASF licenses this file
|
||||||
|
# to you under the Apache License, Version 2.0 (the
|
||||||
|
# "License"); you may not use this file except in compliance
|
||||||
|
# with the License. You may obtain a copy of the License at
|
||||||
|
#
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing,
|
||||||
|
# software distributed under the License is distributed on an
|
||||||
|
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
|
# KIND, either express or implied. See the License for the
|
||||||
|
# specific language governing permissions and limitations
|
||||||
|
# under the License.
|
||||||
|
#
|
||||||
|
|
||||||
|
name: Precommit - Verify releasing Pulsar Helm Chart
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- '*'
|
||||||
|
paths:
|
||||||
|
- 'charts/pulsar/**'
|
||||||
|
jobs:
|
||||||
|
release:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: Install chart
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
PUBLISH_CHARTS: false
|
||||||
|
run: |
|
||||||
|
.ci/release.sh
|
||||||
@ -21,7 +21,7 @@ apiVersion: v1
|
|||||||
appVersion: "1.0"
|
appVersion: "1.0"
|
||||||
description: Apache Pulsar Helm chart for Kubernetes
|
description: Apache Pulsar Helm chart for Kubernetes
|
||||||
name: pulsar
|
name: pulsar
|
||||||
version: 1.0.0
|
version: 2.6.0
|
||||||
home: https://pulsar.apache.org
|
home: https://pulsar.apache.org
|
||||||
sources:
|
sources:
|
||||||
- https://github.com/apache/pulsar
|
- https://github.com/apache/pulsar
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user