-
Notifications
You must be signed in to change notification settings - Fork 9.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into rabbitmq-extraports
Signed-off-by: Rafael Ríos Saavedra <[email protected]>
- Loading branch information
Showing
860 changed files
with
105,712 additions
and
2,417 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -92,7 +92,7 @@ jobs: | |
update-pr: | ||
runs-on: ubuntu-latest | ||
needs: [get-chart] | ||
name: Automatically update README and CRDs | ||
name: Automatically update README, CRDs and CHANGELOG | ||
permissions: | ||
contents: write | ||
outputs: | ||
|
@@ -105,10 +105,59 @@ jobs: | |
ref: ${{github.event.pull_request.head.ref}} | ||
repository: ${{github.event.pull_request.head.repo.full_name}} | ||
token: ${{ secrets.BITNAMI_BOT_TOKEN }} | ||
path: charts | ||
- name: Clone upstream bitnami/charts repository | ||
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 | ||
with: | ||
path: upstream-charts | ||
- name: Setup git configuration | ||
run: | | ||
cd $GITHUB_WORKSPACE/charts | ||
git config user.name "Bitnami Containers" | ||
git config user.email "[email protected]" | ||
# In order to avoid doing a full clone (which would fetch the index branch), we | ||
# unshallow the clone only using the main branch. We need to get the tags to | ||
# regenerate the changelog too | ||
- name: Unshallow main branch and get tags | ||
run: | | ||
cd $GITHUB_WORKSPACE/upstream-charts | ||
git fetch origin main --unshallow | ||
git fetch --tags | ||
- name: Install conventional-changelog-cli | ||
run: npm install -g conventional-changelog-cli | ||
- id: generate-changelog | ||
name: Generate changelog | ||
env: | ||
CHART: ${{ needs.get-chart.outputs.chart }} | ||
run: | | ||
cd $GITHUB_WORKSPACE/upstream-charts | ||
# The generator needs the file to exist | ||
chart_version="$(yq e '.version' $GITHUB_WORKSPACE/charts/bitnami/${CHART}/Chart.yaml)" | ||
changelog_file="$GITHUB_WORKSPACE/charts/bitnami/${CHART}/CHANGELOG.md" | ||
changelog_tmp="$GITHUB_WORKSPACE/charts/bitnami/${CHART}/CHANGELOG.md.tmp" | ||
touch "$changelog_file" | ||
npx conventional-changelog-cli -i ${changelog_file} -s -t ${CHART}/ -r 0 --commit-path bitnami/${CHART} | ||
# The tool uses short sha to generate commit links. Sometimes, Github does not offer links with the short sha, so we change all commit links to use the full sha instead | ||
for short_sha in $(grep -Eo "/commit/[a-z0-9]+" ${changelog_file} | awk -F/ '{print $3}'); do | ||
long_sha="$(git rev-list @ | grep "^$short_sha" | head -n 1)"; | ||
sed -i "s%/commit/$short_sha%/commit/$long_sha%g" ${changelog_file}; | ||
done | ||
cd $GITHUB_WORKSPACE/charts | ||
# Remove unreleased section (includes all intermediate commits in the branch) and create future entry based on PR title | ||
# The unreleased section looks like this "## (YYYY-MM-DD)" whereas a released section looks like this "## 0.0.1 (YYYY-MM-DD)" | ||
# So we only need to find a released section to start printing in the awk script below | ||
awk '/^##[^(]*[0-9]/ {flag=1} flag {print}' ${changelog_file} > ${changelog_tmp} | ||
# Remove extra newlines so the changelog file passes the markdown linter | ||
sed -i -E -e '/^$/d' ${changelog_tmp} && sed -i -E -e 's/(##.*)/\n\1\n/g' ${changelog_tmp} | ||
# Include h1 heading and add entry for the current version. There is no tag for the current version (this will be created once merged), so we need to manually add it. | ||
# We know the final squashed commit title, which will be the PR title. We cannot add a link to the commit in the main branch because it has not been | ||
# merged yet (this will be corrected once a new version regenerates the changelog). Instead, we add the PR url which contains the exact same information. | ||
echo -e -n "# Changelog\n\n## $chart_version ($(date +'%Y-%m-%d'))\n\n* ${{ github.event.pull_request.title }} ([#${{ github.event.number }}](${{ github.server_url }}/${{ github.repository }}/pull/${{ github.event.number }}))\n" > ${changelog_file} | ||
cat ${changelog_tmp} >> ${changelog_file} | ||
rm ${changelog_tmp} | ||
if git status -s | grep "bitnami/${CHART}/CHANGELOG.md"; then | ||
git add "bitnami/${CHART}/CHANGELOG.md" && git commit -m "Update CHANGELOG.md" --signoff | ||
fi | ||
- name: Install readme-generator-for-helm | ||
if: needs.get-chart.outputs.values-updated == 'true' | ||
run: npm install -g @bitnami/readme-generator-for-helm | ||
|
@@ -119,6 +168,7 @@ jobs: | |
CHART: ${{ needs.get-chart.outputs.chart }} | ||
run: | | ||
exit_code=0 | ||
cd $GITHUB_WORKSPACE/charts | ||
echo "Validating README.md for bitnami/${CHART}" | ||
# Validating *.registry parameters | ||
while read line; do | ||
|
@@ -165,6 +215,7 @@ jobs: | |
CHART: ${{ needs.get-chart.outputs.chart }} | ||
run: | | ||
# Updating CRDs stored at 'bitnami/$CHART/crds' and 'bitnami/$CHART/templates/crds' | ||
cd $GITHUB_WORKSPACE/charts | ||
mapfile -t crd_files < <(find "bitnami/${CHART}/crds" "bitnami/${CHART}/templates/crds" -name "*.yaml" -o -name "*.yml" 2>/dev/null || true) | ||
for file in "${crd_files[@]}"; do | ||
# Automatically update CRDs that use the '# Source' header | ||
|
@@ -245,6 +296,7 @@ jobs: | |
- id: update-pr | ||
name: Push changes | ||
run: | | ||
cd $GITHUB_WORKSPACE/charts | ||
# Push all the new commits, if any | ||
if [[ $(git cherry -v) ]]; then | ||
git push | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
LICENSE.md | ||
.github/PULL_REQUEST_TEMPLATE.md | ||
CHANGELOG.md |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
module test-scylladb-chart | ||
|
||
go 1.20 | ||
|
||
replace github.com/bitnami/charts/.vib/common-tests/ginkgo-utils => ../../common-tests/ginkgo-utils | ||
|
||
require ( | ||
github.com/bitnami/charts/.vib/common-tests/ginkgo-utils v0.0.0-00010101000000-000000000000 | ||
github.com/onsi/ginkgo/v2 v2.11.0 | ||
github.com/onsi/gomega v1.27.8 | ||
k8s.io/api v0.28.0 | ||
k8s.io/apimachinery v0.28.0 | ||
k8s.io/client-go v0.28.0 | ||
) | ||
|
||
require ( | ||
github.com/davecgh/go-spew v1.1.1 // indirect | ||
github.com/emicklei/go-restful/v3 v3.9.0 // indirect | ||
github.com/go-logr/logr v1.2.4 // indirect | ||
github.com/go-openapi/jsonpointer v0.19.6 // indirect | ||
github.com/go-openapi/jsonreference v0.20.2 // indirect | ||
github.com/go-openapi/swag v0.22.3 // indirect | ||
github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 // indirect | ||
github.com/gogo/protobuf v1.3.2 // indirect | ||
github.com/golang/protobuf v1.5.3 // indirect | ||
github.com/google/gnostic-models v0.6.8 // indirect | ||
github.com/google/go-cmp v0.5.9 // indirect | ||
github.com/google/gofuzz v1.2.0 // indirect | ||
github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1 // indirect | ||
github.com/google/uuid v1.3.0 // indirect | ||
github.com/imdario/mergo v0.3.6 // indirect | ||
github.com/josharian/intern v1.0.0 // indirect | ||
github.com/json-iterator/go v1.1.12 // indirect | ||
github.com/mailru/easyjson v0.7.7 // indirect | ||
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect | ||
github.com/modern-go/reflect2 v1.0.2 // indirect | ||
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect | ||
github.com/spf13/pflag v1.0.5 // indirect | ||
golang.org/x/net v0.23.0 // indirect | ||
golang.org/x/oauth2 v0.8.0 // indirect | ||
golang.org/x/sys v0.18.0 // indirect | ||
golang.org/x/term v0.18.0 // indirect | ||
golang.org/x/text v0.14.0 // indirect | ||
golang.org/x/time v0.3.0 // indirect | ||
golang.org/x/tools v0.9.3 // indirect | ||
google.golang.org/appengine v1.6.7 // indirect | ||
google.golang.org/protobuf v1.33.0 // indirect | ||
gopkg.in/inf.v0 v0.9.1 // indirect | ||
gopkg.in/yaml.v2 v2.4.0 // indirect | ||
gopkg.in/yaml.v3 v3.0.1 // indirect | ||
k8s.io/klog/v2 v2.100.1 // indirect | ||
k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9 // indirect | ||
k8s.io/utils v0.0.0-20230406110748-d93618cff8a2 // indirect | ||
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect | ||
sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect | ||
sigs.k8s.io/yaml v1.3.0 // indirect | ||
) |
Oops, something went wrong.