Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
95 commits
Select commit Hold shift + click to select a range
0d178c3
reuse
sdomarecki-sap Mar 13, 2025
50be4e9
License update
sdomarecki-sap Mar 13, 2025
36eb194
Migration
sdomarecki-sap Mar 19, 2025
5612fa6
Updated Release Charts workflow
wchomik Mar 24, 2025
46d008c
Updated Release Charts workflow
wchomik Mar 24, 2025
057bb7d
Added push to OCI to the release workflow (#2)
wchomik Apr 2, 2025
a61c8ae
Fix push release to OCI
wchomik Apr 2, 2025
01c3a88
Update gh-pages-release.yml permissions
wchomik Apr 2, 2025
826c9eb
Release pipeline now includes test-custom-chart
wchomik Apr 3, 2025
ab092e6
Update README.md in test-custom-chart
wchomik Apr 3, 2025
db2cde0
Updating values.ci and updating PR workflow
wchomik Apr 11, 2025
5d82c00
Updating PR workflow (#5)
wchomik Apr 11, 2025
f1e08a2
Merge branch 'main' into chore/os_preparations
wchomik Apr 11, 2025
151253e
Removed confidential values from values files
wchomik Apr 14, 2025
8c0329b
chore(ci): update helm/charts/mcp/crossplane-provider-apiextensions-c…
Apr 14, 2025
1a56ef0
chore(ci): update helm/charts/mcp/crossplane-provider-aws-ec2/Chart.y…
Apr 14, 2025
f554abb
chore(ci): update helm/charts/mcp/crossplane-provider-aws-eks/Chart.y…
Apr 14, 2025
6a14a6a
chore(ci): update helm/charts/mcp/crossplane-provider-aws-iam/Chart.y…
Apr 14, 2025
19dac6f
chore(ci): update helm/charts/mcp/crossplane-provider-aws-rdr/Chart.y…
Apr 14, 2025
d9af0db
chore(ci): update helm/charts/mcp/crossplane-provider-configs/Chart.y…
Apr 14, 2025
cd9aa85
chore(ci): update helm/charts/mcp/external-secrets-config/Chart.yaml.…
Apr 14, 2025
ff875dd
chore(ci): update Helm Chart helm/charts/mcp/crossplane-gardener-core…
Apr 14, 2025
86869a0
chore(ci): update Helm Chart helm/charts/mcp/crossplane-gardener-shoo…
Apr 14, 2025
ccad23d
chore(ci): update Helm Chart helm/charts/mcp/crossplane-gardener-shoo…
Apr 14, 2025
4266eaf
chore(ci): update Helm Chart helm/charts/mcp/crossplane-provider-apie…
Apr 14, 2025
e7b6e02
chore(ci): update Helm Chart helm/charts/mcp/crossplane-provider-apie…
Apr 14, 2025
9dc4f4a
chore(ci): update Helm Chart helm/charts/mcp/crossplane-provider-aws-…
Apr 14, 2025
be4c9e5
chore(ci): update Helm Chart helm/charts/mcp/crossplane-provider-aws-…
Apr 14, 2025
66316da
chore(ci): update Helm Chart helm/charts/mcp/crossplane-provider-aws-…
Apr 14, 2025
d79c12f
chore(ci): update Helm Chart helm/charts/mcp/crossplane-provider-aws-…
Apr 14, 2025
82b9f5a
chore(ci): update Helm Chart helm/charts/mcp/crossplane-provider-btp-…
Apr 14, 2025
3bb596e
chore(ci): update Helm Chart helm/charts/mcp/crossplane-provider-conf…
Apr 14, 2025
df5c272
chore(ci): update Helm Chart helm/charts/mcp/crossplane-provider-gcp/…
Apr 14, 2025
29aeb13
chore(ci): update Helm Chart helm/charts/mcp/crossplane-provider-helm…
Apr 14, 2025
002676f
chore(ci): update Helm Chart helm/charts/mcp/crossplane-provider-kube…
Apr 14, 2025
4a221d0
chore(ci): update Helm Chart helm/charts/mcp/crossplane-provider-pkgs…
Apr 14, 2025
276c296
chore(ci): update Helm Chart helm/charts/mcp/crossplane-provider-sap-…
Apr 14, 2025
7f427b0
chore(ci): update Helm Chart helm/charts/mcp/crossplane-provider-sap-…
Apr 14, 2025
bcbea1e
chore(ci): update Helm Chart helm/charts/mcp/external-secrets-config/…
Apr 14, 2025
f5543e6
chore(ci): update Helm Chart helm/charts/mcp/flux-config/README.md file
Apr 14, 2025
862fda7
chore(ci): update Helm Chart helm/charts/mcp/k8s-validating-admission…
Apr 14, 2025
851c433
chore(ci): update Helm Chart helm/charts/mcp/sap-btp-services/README.…
Apr 14, 2025
86abaca
chore(ci): update Helm Chart helm/charts/test-custom-chart/README.md …
Apr 14, 2025
fe2f941
Fixed workflow
wchomik Apr 14, 2025
baa4aea
chore(ci): update helm/charts/mcp/crossplane-gardener-core-cloud/Char…
Apr 14, 2025
1108dae
chore(ci): update helm/charts/mcp/crossplane-gardener-shoot-clusters/…
Apr 14, 2025
3865a88
chore(ci): update helm/charts/mcp/crossplane-gardener-shoot-kubeconfi…
Apr 14, 2025
6b2b480
chore(ci): update helm/charts/mcp/crossplane-provider-apiextensions/C…
Apr 14, 2025
3fa1fe7
chore(ci): update helm/charts/mcp/crossplane-provider-btp-security/Ch…
Apr 14, 2025
4e11def
chore(ci): update helm/charts/mcp/crossplane-provider-gcp/Chart.yaml.…
Apr 14, 2025
d09dac2
chore(ci): update helm/charts/mcp/crossplane-provider-helm/Chart.yaml…
Apr 14, 2025
d300410
chore(ci): update helm/charts/mcp/crossplane-provider-kubernetes/Char…
Apr 14, 2025
7755c5f
chore(ci): update helm/charts/mcp/crossplane-provider-pkgs/Chart.yaml…
Apr 14, 2025
1abbf24
chore(ci): update helm/charts/mcp/crossplane-provider-sap-btp-account…
Apr 14, 2025
0dd79f2
chore(ci): update helm/charts/mcp/crossplane-provider-sap-btp-environ…
Apr 14, 2025
1c90ea0
chore(ci): update helm/charts/mcp/flux-config/Chart.yaml.version 0.0.…
Apr 14, 2025
0f195ac
chore(ci): update helm/charts/mcp/k8s-validating-admission-policy/Cha…
Apr 14, 2025
cfa562e
chore(ci): update helm/charts/mcp/sap-btp-services/Chart.yaml.version…
Apr 14, 2025
a175e44
chore(ci): update helm/charts/test-custom-chart/Chart.yaml.version 0.…
Apr 14, 2025
9843afb
chore(ci): update Helm Chart helm/charts/mcp/crossplane-gardener-core…
Apr 14, 2025
d91df19
chore(ci): update Helm Chart helm/charts/mcp/crossplane-gardener-shoo…
Apr 14, 2025
e46d293
chore(ci): update Helm Chart helm/charts/mcp/crossplane-gardener-shoo…
Apr 14, 2025
dabbad2
chore(ci): update Helm Chart helm/charts/mcp/crossplane-provider-apie…
Apr 14, 2025
0d960c4
chore(ci): update Helm Chart helm/charts/mcp/crossplane-provider-btp-…
Apr 14, 2025
d5d8e2a
chore(ci): update Helm Chart helm/charts/mcp/crossplane-provider-gcp/…
Apr 14, 2025
9e5be12
chore(ci): update Helm Chart helm/charts/mcp/crossplane-provider-helm…
Apr 14, 2025
5f00731
chore(ci): update Helm Chart helm/charts/mcp/crossplane-provider-kube…
Apr 14, 2025
e81d98e
chore(ci): update Helm Chart helm/charts/mcp/crossplane-provider-pkgs…
Apr 14, 2025
7ece274
chore(ci): update Helm Chart helm/charts/mcp/crossplane-provider-sap-…
Apr 14, 2025
2bb1932
chore(ci): update Helm Chart helm/charts/mcp/crossplane-provider-sap-…
Apr 14, 2025
b2b21a6
chore(ci): update Helm Chart helm/charts/mcp/flux-config/README.md file
Apr 14, 2025
1ba41cb
chore(ci): update Helm Chart helm/charts/mcp/k8s-validating-admission…
Apr 14, 2025
f4f2546
chore(ci): update Helm Chart helm/charts/mcp/sap-btp-services/README.…
Apr 14, 2025
c6d5ba7
chore(ci): update Helm Chart helm/charts/test-custom-chart/README.md …
Apr 14, 2025
1c7c443
chore(ci): k8s manifest templated for Helm Charts
Apr 14, 2025
7dddf7a
Fixed workflows added README.md
wchomik Apr 14, 2025
de588e4
chore(ci): k8s manifest templated for Helm Charts
Apr 14, 2025
b0484c2
Fixed workflows
wchomik Apr 14, 2025
09e3da1
Fixed workflows
wchomik Apr 14, 2025
8568749
Anonymizing values
wchomik Apr 15, 2025
ff9354e
chore(ci): update Helm Chart helm/charts/mcp/crossplane-gardener-core…
Apr 15, 2025
595655d
chore(ci): update Helm Chart helm/charts/mcp/crossplane-gardener-shoo…
Apr 15, 2025
2e1115b
chore(ci): update Helm Chart helm/charts/mcp/crossplane-gardener-shoo…
Apr 15, 2025
ee0781d
chore(ci): update Helm Chart helm/charts/mcp/crossplane-provider-apie…
Apr 15, 2025
ba21b0b
chore(ci): update Helm Chart helm/charts/mcp/crossplane-provider-conf…
Apr 15, 2025
f9d5c52
chore(ci): update Helm Chart helm/charts/mcp/crossplane-provider-helm…
Apr 15, 2025
0c3d521
chore(ci): update Helm Chart helm/charts/mcp/crossplane-provider-sap-…
Apr 15, 2025
4b2aaca
chore(ci): update Helm Chart helm/charts/mcp/crossplane-provider-sap-…
Apr 15, 2025
c54e137
chore(ci): update Helm Chart helm/charts/mcp/external-secrets-config/…
Apr 15, 2025
995eddf
chore(ci): update Helm Chart helm/charts/mcp/flux-config/README.md file
Apr 15, 2025
e5c33d6
Adjusting workflows execution
wchomik Apr 15, 2025
b4588be
Testing workflows
wchomik Apr 15, 2025
dbd0d85
Turned on release notes generation
wchomik Apr 17, 2025
346de80
Addressing PR requests
wchomik Apr 18, 2025
a9abd8b
Update yamllint.yml
sk31337 Apr 22, 2025
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
46 changes: 46 additions & 0 deletions .github/.yamllint.config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
---
# Default configuration https://yamllint.readthedocs.io/en/stable/configuration.html
yaml-files:
- '*.yaml'
- '*.yml'
- '.yamllint'

rules:
anchors: enable
braces: enable
brackets: enable
colons: enable
commas: enable
comments:
level: warning
min-spaces-from-content: 1
comments-indentation:
level: warning
document-end: disable
document-start:
level: warning
empty-lines: enable
empty-values: #disable
forbid-in-block-mappings: true
forbid-in-flow-mappings: true
float-values: disable
hyphens: enable
indentation: #enable
spaces: consistent
indent-sequences: whatever
check-multi-line-strings: false
key-duplicates: enable
key-ordering: disable
line-length: disable
new-line-at-end-of-file: enable
new-lines: enable
octal-values: disable
quoted-strings: disable
# quote-type: double
# required: true
# extra-required: []
# extra-allowed: []
# allow-quoted-quotes: false
trailing-spaces: enable
truthy:
level: warning
16 changes: 16 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
name: Bug Report
about: Report a bug
labels: kind/bug

---

**What happened**:

**What you expected to happen**:

**How to reproduce it (as minimally and precisely as possible)**:

**Anything else we need to know**:

**Environment**:
10 changes: 10 additions & 0 deletions .github/ISSUE_TEMPLATE/enhancement_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
name: Enhancement Request
about: Suggest an enhancement
labels: kind/enhancement

---

**What would you like to be added**:

**Why is this needed**:
40 changes: 40 additions & 0 deletions .github/actions/git-release-create/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: "Helm Chart Release Tag"
description: "Generates release notes and creates a new GitHub release for a Helm Chart tag"

runs:
using: "composite"
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Print commit SHA
shell: bash
run: echo ${{ github.sha }}
- name: Tag modified Helm Chart
shell: bash
run: |
set +e
${GITHUB_ACTION_PATH}/git-release-fix.sh &> ${GITHUB_WORKSPACE}/bash_output.txt
env:
COMMIT_HASH: ${{ github.sha }}

- name: Bash Output
shell: bash
if: always()
run: |
if [ -f "${GITHUB_WORKSPACE}/bash_output.txt" ]; then
echo "::group:: Bash Script Output"
cat ${GITHUB_WORKSPACE}/bash_output.txt
echo "::endgroup::"
fi

if [ -f "${GITHUB_WORKSPACE}/pr-status-check-human-friendly.txt" ]; then
echo "::group:: PR Status Check Human Friendly Output"
cat "${GITHUB_WORKSPACE}/pr-status-check-human-friendly.txt"
echo "::endgroup::"
fi

if [ -f "${GITHUB_WORKSPACE}/github-workflow-commands.txt" ]; then
cat "${GITHUB_WORKSPACE}/github-workflow-commands.txt"
fi
50 changes: 50 additions & 0 deletions .github/actions/git-release-create/git-release-fix.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
#!/bin/bash
###################################################################
# Script Name : github release create
# Description : This script fetches all Git tags, checks if a GitHub release already exists for
# each tag, and if not, generates release notes and creates a new GitHub release
# for the tag. It searches for a previous tag that starts with the same name as the
# current tag but has a lower semantic version.
# Args : -
# Hint : This script is not meant for any pipeline just for cleanup!
###################################################################
set +e

# Fetch all tags from the remote
gh auth status

git fetch --tags

# Get all tags
tags=$(git tag)

# Fetch all existing releases
existing_releases=$(gh release list --limit 99999 --json tagName --jq '.[].tagName')

# Loop through each tag
for tag in $tags; do
if echo "$existing_releases" | grep -q "^$tag$"; then
echo "Release for tag $tag already exists. Skipping..."
continue
fi

# Find the previous tag with the same prefix but lower semantic version
previous_tag=""
prefix=""
prefix=$(echo "$tag" | sed -E 's/([0-9]+\.[0-9]+\.[0-9]+)$//')
previous_tag=$(git tag -l "${prefix}*" | sort -V | grep -B1 "$tag" | head -n 1)

release_notes=""
# Generate release notes using the GitHub CLI
if [ -n "$previous_tag" ] && [ "$previous_tag" != "$tag" ]; then
release_notes=$(gh api repos/:owner/:repo/releases/generate-notes -f tag_name="$tag" -f previous_tag_name="$previous_tag" -q '.body')
printf 'tag: %s != previous_tag: %s \n %s' "$tag" "$previous_tag" "$release_notes"
else
release_notes=$(gh api repos/:owner/:repo/releases/generate-notes -f tag_name="$tag" -q '.body')
printf 'tag: %s == previous_tag: %s \n %s' "$tag" "$previous_tag" "$release_notes"
fi

# Create a release for each tag
gh release create "$tag" --title "$tag" --notes "$release_notes" --verify-tag --latest=false

done
40 changes: 40 additions & 0 deletions .github/actions/git-tag-modified-helm-chart/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: 'Tag modified Helm Chart'
description: 'Create Git Tag for every modified Helm Chart'

runs:
using: "composite"
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Print commit SHA
shell: bash
run: echo ${{ github.sha }}
- name: Tag modified Helm Chart
shell: bash
run: |
set +e
${GITHUB_ACTION_PATH}/git-tag-modified-helm-chart.sh &> ${GITHUB_WORKSPACE}/bash_output.txt
env:
COMMIT_HASH: ${{ github.sha }}

- name: Bash Output
shell: bash
if: always()
run: |
if [ -f "${GITHUB_WORKSPACE}/bash_output.txt" ]; then
echo "::group:: Bash Script Output"
cat ${GITHUB_WORKSPACE}/bash_output.txt
echo "::endgroup::"
fi

if [ -f "${GITHUB_WORKSPACE}/pr-status-check-human-friendly.txt" ]; then
echo "::group:: PR Status Check Human Friendly Output"
cat "${GITHUB_WORKSPACE}/pr-status-check-human-friendly.txt"
echo "::endgroup::"
fi

if [ -f "${GITHUB_WORKSPACE}/github-workflow-commands.txt" ]; then
cat "${GITHUB_WORKSPACE}/github-workflow-commands.txt"
fi
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
#!/bin/bash
###################################################################
#Script Name : git tag modified helm chart
#Description : creates a git tag for each modified helm chart
#Args : -
#Hint : Only works with Helm Chart Version compare
###################################################################
SCRIPT_DIR=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" &>/dev/null && pwd)
# shellcheck disable=SC1091
source "$SCRIPT_DIR"/../shared-variables.sh

declare resultPwd exitCode

set +e
echo "The script you are running has:"
echo "basename: [$(basename "$0")]"
echo "dirname : [$(dirname "$0")]"
echo "pwd : [$(pwd)]"

declare -a filesToRemove=("pr-status-check-human-friendly.txt" "modified_files.txt")
REMOVE_FILES_IF_EXISTS "$resultPwd" "${filesToRemove[@]}"
###################################################################
if [ -z "$COMMIT_HASH" ]; then
COMMIT_HASH="89b624080bb62e7f5ac340d81fef96c9d6446d22"
echo "!!! WARNING: \$COMMIT_HASH NEEDS TO BE SET e.g. Default set COMMIT_HASH=${COMMIT_HASH}! \"export COMMIT_HASH=${COMMIT_HASH}\"!!!"
exit 1
fi


###################################################################
# Function to print a row with fixed-width columns
print_row() {
printf "%-70s %-50s %-15s %-15s\n" "$1" "$2" "$3" "$4"
}

git_tag_check() {
local tag=$1
git rev-parse -q --verify "refs/tags/$tag" &>/dev/null
}
###################################################################

# List modified files of commit
git diff-tree --no-commit-id --name-only -r "$COMMIT_HASH" >modified_files.txt
# shellcheck disable=SC2181
if [ $? != 0 ]; then
exit 1
fi
# Iterate over the array of paths with filenames and extract the directory paths
unique_paths=()
while IFS= read -r path; do

dir=$(dirname "$path")

if [[ "$dir" == *templates ]]; then
dir=${dir%/*}
fi
dir=${dir%*/templates*} # retain the part before "/templates"

if [ -f "$dir/Chart.yaml" ] || [ -f "$dir/Chart.yml" ]; then
unique_paths+=("$dir")
fi
done <"modified_files.txt"

if [ ${#unique_paths[@]} -eq 0 ]; then
echo -e "No Helm Charts have been modified!\n"
echo -e "List of Modified files:"
cat "modified_files.txt"
exit "$exitCode"
fi

# Sort and remove duplicates from the list of paths
# shellcheck disable=SC2207
unique_paths=($(echo "${unique_paths[@]}" | tr ' ' '\n' | sort -u))
{
# Header row
printf "%-70s %-50s %-15s %-15s\n" "Modified Helm Chart:" "Name:" "Version:" "Status:"

git checkout "$COMMIT_HASH"

for helmChart in "${unique_paths[@]}"; do
chartVersion=$(yq -r eval '.version' "$helmChart/Chart.yaml")
chartName=$(yq -r eval '.name' "$helmChart/Chart.yaml")
gitTag="$chartName-$chartVersion"
if git_tag_check "$gitTag"; then
print_row "$helmChart" "$chartName" "$chartVersion" "-"
else

git tag "$gitTag" "$COMMIT_HASH"
# shellcheck disable=SC2181
if [ $? != 0 ]; then
print_row "$helmChart" "$chartName" "$chartVersion" "ERROR: git tag $gitTag"
exit 1
fi

git push origin "$gitTag"
# shellcheck disable=SC2181
if [ $? != 0 ]; then
print_row "$helmChart" "$chartName" "$chartVersion" "ERROR: git push origin $gitTag"
exit 1
fi

print_row "$helmChart" "$chartName" "$chartVersion" "git tagged&pushed $gitTag"

fi

done

} >>"$resultPwd/pr-status-check-human-friendly.txt"

cat "$resultPwd/pr-status-check-human-friendly.txt"

exit "$exitCode"
52 changes: 52 additions & 0 deletions .github/actions/shared-variables.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
#!/bin/bash
###################################################################
#Script Name :
#Description :
#Args : -
#Hint :
###################################################################
set -e
resultPwd=$(pwd)
helmChartListingFileName="helm-charts-templated.yaml"
emptyManifestString="WARNING: This chart is deprecated"
newLineString="-------------------------------------------------------------------------------------------------------------------------"
msgHelpStart=""
#msgEverythingIsFine="/人◕ __ ◕人\ Everything seems to be all right (⌐⊙_⊙)"
msgEverythingIsFine="☺ √"
exitCode=0
# Define color escape codes
RED='\033[0;31m'
GREEN='\033[0;32m'
YELLOW='\033[0;33m'
BLUE='\033[0;34m'
BOLD='\033[1m'
UNDERLINE='\033[4m'
REVERSE='\033[7m'
RESET='\033[0m' # Reset color
###################################################################
declare -a filesToRemove=("pr-status-check-human-friendly.txt" "github-workflow-commands.txt")
###################################################################
function REMOVE_FILES_IF_EXISTS {
arr=("$@")
for fileToRemove in "${arr[@]}"
do
if [ -f "$1/$fileToRemove" ]; then
rm "$1/$fileToRemove"
#echo "removed $1/$fileToRemove"
fi
done
}
function ASSERT_FILE_EXISTS_WITH_MSG {
if [ ! -f "$1/$2" ]; then
echo "!! ERROR missing file $1/$2 !!$3"
exit 1
fi
}
###################################################################
if [ -n "$GITHUB_WORKSPACE" ]; then
cd "$GITHUB_WORKSPACE" || exit
resultPwd=$GITHUB_WORKSPACE
fi
REMOVE_FILES_IF_EXISTS "$resultPwd" "${filesToRemove[@]}"
###################################################################
export helmChartListingFileName emptyManifestString newLineString exitCode resultPwd helmChartListTemplatedManifestsFileName msgHelpStart msgEverythingIsFine RED GREEN YELLOW BLUE BOLD UNDERLINE RESET REVERSE
Loading
Loading