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
39 changes: 3 additions & 36 deletions .github/workflows/helm-charts.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
- name: "Install yq"
run: |
sudo snap install yq
- name: "Publish Helm3 Charts"
- name: "Publish Helm Charts"
env:
HELM_REGISTRY: https://charts.securecodebox.io
USERNAME: ${{ secrets.HELM_REGISTRY_USERNAME }}
Expand All @@ -24,46 +24,13 @@ jobs:
RELEASE_VERSION="${GITHUB_REF#refs/*/}"
# Remove leading 'v' from git tag to create valid semver
RELEASE_VERSION="${RELEASE_VERSION//v}"
# Publish all helm3 charts in all folders containing a `Chart.yaml` file
# Publish all helm charts in all folders containing a `Chart.yaml` file
# https://github.com/koalaman/shellcheck/wiki/SC2044
find . -type f -name Chart.yaml -print0 | while IFS= read -r -d '' chart; do
(
dir="$(dirname "${chart}")"
cd "${dir}" || exit
echo "Processing Helm3 Chart in $dir"
helm package --version $RELEASE_VERSION .
NAME=$(yq eval '.name' - < Chart.yaml)
curl --silent --show-error --user "${USERNAME}:${PASSWORD}" --data-binary "@${NAME}-${RELEASE_VERSION}.tgz" "${HELM_REGISTRY}/api/charts"
)
done
- name: "Publish Helm2 Charts"
env:
HELM_REGISTRY: https://charts-helm2.securecodebox.io
USERNAME: ${{ secrets.HELM_REGISTRY_USERNAME }}
PASSWORD: ${{ secrets.HELM_REGISTRY_PASSWORD }}
run: |
RELEASE_VERSION="${GITHUB_REF#refs/*/}"
# Remove leading 'v' from git tag to create valid semver
RELEASE_VERSION="${RELEASE_VERSION//v}"
# Publish all helm2 charts in all folders containing a `helm2.Chart.yaml` file
# https://github.com/koalaman/shellcheck/wiki/SC2044
find . -type f -name helm2.Chart.yaml -print0 | while IFS= read -r -d '' chart; do
(
dir="$(dirname "${chart}")"
cd "${dir}" || exit
mv Chart.yaml helm3.Chart.yaml
mv helm2.Chart.yaml Chart.yaml
if [ "$(basename "$PWD")" = "operator" ]
then
echo "Moving CRDS to templates folder, as helm2 doesn't have native crds support."
mv crds templates/crds
fi
echo "Restoring Helm2 Chart and replace Helm3 Chart temporary"
[ ! -f helm2.requirements.lock ] || mv helm2.requirements.lock requirements.lock
[ ! -f helm2.requirements.yaml ] || mv helm2.requirements.yaml requirements.yaml
# Removing packaged Helm3 chart version build in the previous step
rm *.tgz
echo "Processing Helm2 Chart in $dir"
echo "Processing Helm Chart in $dir"
helm package --version $RELEASE_VERSION .
NAME=$(yq eval '.name' - < Chart.yaml)
curl --silent --show-error --user "${USERNAME}:${PASSWORD}" --data-binary "@${NAME}-${RELEASE_VERSION}.tgz" "${HELM_REGISTRY}/api/charts"
Expand Down
22 changes: 0 additions & 22 deletions demo-apps/bodgeit/helm2.Chart.yaml

This file was deleted.

20 changes: 0 additions & 20 deletions demo-apps/dummy-ssh/helm2.Chart.yaml

This file was deleted.

30 changes: 0 additions & 30 deletions demo-apps/juice-shop/helm2.Chart.yaml

This file was deleted.

20 changes: 0 additions & 20 deletions demo-apps/old-wordpress/helm2.Chart.yaml

This file was deleted.

21 changes: 0 additions & 21 deletions demo-apps/swagger-petstore/helm2.Chart.yaml

This file was deleted.

20 changes: 0 additions & 20 deletions demo-apps/unsafe-https/helm2.Chart.yaml

This file was deleted.

25 changes: 0 additions & 25 deletions hooks/declarative-subsequent-scans/helm2.Chart.yaml

This file was deleted.

25 changes: 0 additions & 25 deletions hooks/finding-post-processing/helm2.Chart.yaml

This file was deleted.

25 changes: 0 additions & 25 deletions hooks/generic-webhook/helm2.Chart.yaml

This file was deleted.

12 changes: 0 additions & 12 deletions hooks/notification-hook/helm2.Chart.yaml

This file was deleted.

28 changes: 0 additions & 28 deletions hooks/persistence-elastic/helm2.Chart.yaml

This file was deleted.

26 changes: 0 additions & 26 deletions hooks/teams-webhook/helm2.Chart.yaml

This file was deleted.

13 changes: 0 additions & 13 deletions hooks/update-field/helm2.Chart.yaml

This file was deleted.

31 changes: 0 additions & 31 deletions operator/helm2.Chart.yaml

This file was deleted.

Loading