-
Notifications
You must be signed in to change notification settings - Fork 137
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create pull request for adding helm index to main branch (#2086)
* Update manifest generation * Add gh action for create pull request for adding helm index to main branch * Add gh action for create pull request for adding helm index to main branch * Add gh action for create pull request for adding helm index to main branch * fixup quotest * fixup! * fixup! * fixup! --------- Co-authored-by: Gabriel Krenn <[email protected]>
- Loading branch information
1 parent
980c54c
commit c99fa05
Showing
2 changed files
with
54 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -248,6 +248,7 @@ jobs: | |
environment: Release | ||
permissions: | ||
contents: write | ||
pull-requests: write | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
|
@@ -319,7 +320,30 @@ jobs: | |
prerelease: false | ||
draft: true | ||
fail_on_unmatched_files: true | ||
|
||
- name: Update index helm file | ||
uses: actions/checkout@v3 | ||
run: | | ||
echo "Updating Helm repo index" | ||
./hack/build/ci/generate-new-helm-index-yaml.sh | ||
- name: Create pull request for adding helm index to main branch | ||
uses: peter-evans/create-pull-request@v5 | ||
with: | ||
base: main | ||
delete-branch: true | ||
add-paths: | | ||
./config/helm/repos/stable/index.yaml | ||
./config/helm/repos/stable/index.yaml.previous | ||
title: '[Automatic] Update index for ${{ github.ref }} release' | ||
commit-message: Update index.yaml | ||
committer: GitHub <[email protected]> | ||
author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com> | ||
body: | | ||
# Description | ||
Upgrade `index.yaml` to include latest version of the helm chart. | ||
## How can this be tested? | ||
Helm upgrade to and install of `${{ github.ref }}` works. | ||
## Checklist | ||
- [x] PR is labeled accordingly | ||
snyk: | ||
name: Push tag to snyk | ||
environment: Release | ||
|
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,29 @@ | ||
#!/bin/bash | ||
|
||
if [ -z "$2" ] | ||
then | ||
echo "Usage: $0 <output-dir> <version_without_prefix>" | ||
exit 1 | ||
fi | ||
|
||
readonly output_dir="${1}" | ||
readonly version_without_prefix="${2}" | ||
|
||
cleanup() { | ||
echo "cleanup" | ||
} | ||
|
||
trap 'cleanup' ERR | ||
|
||
cp "config/helm/repos/stable/index.yaml" "config/helm/repos/stable/index.yaml.previous" | ||
|
||
helm repo index "${output_dir}" \ | ||
--url "https://github.com/Dynatrace/dynatrace-operator/releases/download/v${version_without_prefix}" \ | ||
--merge "./config/helm/repos/stable/index.yaml" | ||
|
||
mv -v "${output_dir}"/index.yaml ./config/helm/repos/stable/index.yaml | ||
|
||
# Fix quotes in place to minimize the diff | ||
sed -i'' -e "s/\"/'/g" ./config/helm/repos/stable/index.yaml | ||
|
||
rm -rf "${output_dir}" |