Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
b2370fb
chore: test chart-release.yml
xiangyisss Jun 20, 2025
6abea7b
chore: trigger the chart-release CI
xiangyisss Jun 20, 2025
e53942c
chore: trigger ci
xiangyisss Jun 20, 2025
1365a24
chore: trigger ci
xiangyisss Jun 20, 2025
45568a7
chore: trigger ci
xiangyisss Jun 20, 2025
00f1863
chore: trigger ci
xiangyisss Jun 20, 2025
afeacac
chore: trigger ci
xiangyisss Jun 20, 2025
fbd9731
chore: apply signs manually for supports Ed25519
xiangyisss Jun 20, 2025
e9406ef
chore: refactor
xiangyisss Jun 20, 2025
1d2f0c5
chore: eliminate .asc format
xiangyisss Jun 24, 2025
f88005f
chore: check output of packaged chart and .prov file
xiangyisss Jun 24, 2025
f3a68fd
chore: validate signed charts properly
xiangyisss Jun 24, 2025
c888cc6
chore: update validate signed charts
xiangyisss Jun 24, 2025
7f2de5e
chore: updated gpgkey with RSA type
xiangyisss Jun 25, 2025
6b929f5
chore: test
xiangyisss Jun 25, 2025
8b096f9
chore: test
xiangyisss Jun 25, 2025
26aa6ad
test
xiangyisss Jun 25, 2025
4fce19f
chore: update Package and Sign Charts
xiangyisss Jun 25, 2025
e5b6eb3
chore: test
xiangyisss Jun 25, 2025
df06a3c
chore: remove debugging code
xiangyisss Jun 25, 2025
34a5d16
Merge remote-tracking branch 'origin/main' into EXVT-5947
xiangyisss Jun 25, 2025
e8f225d
refactor: streamline GPG key handling in chart release workflow
xiangyisss Jun 25, 2025
b2e969e
chore: use exivity chart releaser
xiangyisss Jun 25, 2025
095fcb4
refactor: enhance Makefile with sign and validate package
xiangyisss Jun 25, 2025
c231ccd
Merge remote-tracking branch 'origin/main' into EXVT-5947
xiangyisss Jun 25, 2025
b36fc09
chore: simplify GPG key import and streamline chart packaging process
xiangyisss Jun 26, 2025
391b5c1
chore: clean up Makefile comments
xiangyisss Jun 26, 2025
a3fc236
chore: remove pull_request trigger and streamline chart-releaser exec…
xiangyisss Jun 26, 2025
f2a4df8
chore: add Bitnami helm repository to chart release workflow
xiangyisss Jun 26, 2025
7f6941b
chore: update chart-releaser step to clarify manual dispatch requirement
xiangyisss Jun 26, 2025
f496716
update .github/workflows/chart-release.yml
xiangyisss Jun 26, 2025
f66d809
chore: release only run on tag push
xiangyisss Jun 26, 2025
cd0e78d
chore: remove redundant code
xiangyisss Jun 26, 2025
d4fd5d1
Merge branch 'main' into EXVT-5947
Michiel87 Sep 8, 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
75 changes: 73 additions & 2 deletions .github/workflows/chart-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,21 @@ name: Release Charts

on:
workflow_dispatch:
push:
branches: ["main"]
tags:
- "exivity-*"
paths:
- 'charts/**' # Any file under charts/
- '.github/workflows/chart-release.yml'

jobs:
helm-release:
runs-on: ubuntu-latest
env:
GPG_KEY_ID: ${{ secrets.HELM_RSA_KEY_ID }}
GPG_PASSPHRASE: ${{ secrets.HELM_RSA_PASSPHRASE }}

steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -18,7 +29,67 @@ jobs:
git config user.email "$GITHUB_ACTOR@users.noreply.github.com"
helm repo add bitnami https://charts.bitnami.com/bitnami

- name: Run chart-releaser
uses: exivity/chart-releaser-action@v1.1.0
- name: Configure GPG
run: |
mkdir -p ~/.gnupg
chmod 700 ~/.gnupg
echo "pinentry-mode loopback" > ~/.gnupg/gpg.conf

SECRET_CONTENT="${{ secrets.HELM_RSA_PRIVATE_KEY }}"

echo "${{ secrets.HELM_RSA_PRIVATE_KEY }}" | gpg --batch --import

gpg --batch --export > ~/.gnupg/pubring.gpg
echo "$GPG_PASSPHRASE" | gpg --batch --passphrase-fd 0 --export-secret-keys > ~/.gnupg/secring.gpg

- name: Package and Sign Charts
run: |
KEY_NAME=$(gpg --list-secret-keys --with-colons "$GPG_KEY_ID" | grep "^uid" | head -1 | cut -d: -f10)
echo "$GPG_PASSPHRASE" > /tmp/passphrase.txt
chmod 600 /tmp/passphrase.txt

# Create .cr-release-packages directory for chart-releaser-action
mkdir -p .cr-release-packages

chart_dir=charts/exivity
helm package --sign "$chart_dir" \
--key "$KEY_NAME" \
--keyring ~/.gnupg/secring.gpg \
--passphrase-file /tmp/passphrase.txt \
--destination .cr-release-packages

rm -f /tmp/passphrase.txt

# List created packages for verification
echo "✅ Created signed packages:"
ls -la .cr-release-packages/

- name: Validate Signed Charts
run: |
mkdir -p ~/.gnupg
chmod 700 ~/.gnupg
echo "pinentry-mode loopback" > ~/.gnupg/gpg.conf

SECRET_CONTENT="${{ secrets.HELM_RSA_PRIVATE_KEY }}"

echo "${{ secrets.HELM_RSA_PRIVATE_KEY }}" | gpg --batch --import
gpg --batch --export > ~/.gnupg/pubring.gpg

# Validate charts from the .cr-release-packages directory
find .cr-release-packages -maxdepth 1 -type f -name '*.tgz' -print -exec helm verify {} \;

echo "✅ Charts are properly signed and verified."

- name: Run chart-releaser (release only on tag push)
if: startsWith(github.ref, 'refs/tags/')
uses: exivity/chart-releaser-action@v1.7.0
with:
skip_packaging: true
env:
CR_TOKEN: "${{ secrets.GH_BOT_TOKEN }}"

- name: Cleanup
if: always()
run: |
gpg --batch --yes --delete-secret-keys "$GPG_KEY_ID" 2>/dev/null || true
gpg --batch --yes --delete-keys "$GPG_KEY_ID" 2>/dev/null || true
83 changes: 80 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,11 +1,25 @@
# Makefile — Exivity Helm Charts: Deployment + Release Testing

# Constants
NFS_STORAGE_CLASS := nfs-client
NFS_CHART_VERSION := 1.8.0

INGRESS_HOSTNAME := exivity.local

HELM_TIMEOUT := 10m

# Dummy secrets for release workflow testing
GPG_KEY_ID ?= EXIVITY123TEST
GPG_PASSPHRASE ?= test1234
HELM_RSA_PRIVATE_KEY ?= LS0tLS1CRUdJTiBQR1AgUFJJVkFURSBLRVkgQkxPQ0stLS0tLQpFeGl2aXR5IFRlc3QgS2V5IDx0ZXN0QGV4aXZpdHkuY29tPgotLS0tLUVORCBQR1AgUFJJVkFURSBLRVkgQkxPQ0stLS0tLQ==

# Variables for chart packaging
CHART_DIRS := $(shell find charts -maxdepth 1 -mindepth 1 -type d 2>/dev/null || echo "")
TGZ_FILES := $(patsubst charts/%,%.tgz,$(CHART_DIRS))


# =====================================================================
# MINIKUBE DEPLOYMENT TARGETS
# =====================================================================

# Define Minikube start with a specific driver
minikube-start:
@minikube start --memory 8192 --cpus 2
Expand Down Expand Up @@ -69,6 +83,69 @@ test:
# Lint Helm chart
lint:
@helm lint charts/exivity

# =====================================================================
# RELEASE WORKFLOW TEST
# =====================================================================

# Package exivity charts
package-charts:
@echo "📦 Simulating GitHub Actions 'Package and Sign Charts' step"
@echo "Creating .cr-release-packages directory for chart-releaser-action"
@mkdir -p .cr-release-packages
@echo "Packaging chart: charts/exivity"
@if [ -d "charts/exivity" ]; then \
helm package "charts/exivity" --destination .cr-release-packages > /dev/null 2>&1; \
echo "✅ Created signed packages:"; \
ls -la .cr-release-packages/; \
else \
echo "❌ Chart directory charts/exivity not found"; \
fi

# Sign the packaged charts
package-sign:
@echo "🔖 Simulating GPG signing (creating fake .prov files)"
@if ls .cr-release-packages/*.tgz >/dev/null 2>&1; then \
for tgz in .cr-release-packages/*.tgz; do \
echo "-----BEGIN PGP SIGNATURE-----" > "$$tgz.prov"; \
echo "Version: GnuPG v2" >> "$$tgz.prov"; \
echo "" >> "$$tgz.prov"; \
echo "Fake signature for testing purposes only" >> "$$tgz.prov"; \
echo "Chart: $$tgz" >> "$$tgz.prov"; \
echo "Key ID: $(GPG_KEY_ID)" >> "$$tgz.prov"; \
echo "Passphrase: $(GPG_PASSPHRASE)" >> "$$tgz.prov"; \
echo "-----END PGP SIGNATURE-----" >> "$$tgz.prov"; \
echo " ✅ Created $$tgz.prov"; \
done; \
echo "📋 Updated packages with signatures:"; \
ls -la .cr-release-packages/; \
else \
echo " ⚠️ No .tgz files found in .cr-release-packages/"; \
fi

# Validate signed charts
package-validate:
@echo "✅ Simulating GitHub Actions 'Validate Signed Charts' step"
@echo "🔍 Finding and validating charts from .cr-release-packages directory:"
@if [ -d ".cr-release-packages" ]; then \
find .cr-release-packages -maxdepth 1 -type f -name '*.tgz' -print | while read chart; do \
echo "� Would run: helm verify $$chart"; \
done; \
if ls .cr-release-packages/*.tgz >/dev/null 2>&1; then \
echo "✅ Charts are properly signed and verified."; \
else \
echo "⚠️ No .tgz files found to validate"; \
fi; \
else \
echo "❌ .cr-release-packages directory not found"; \
fi


# Clean up build artifacts
clean-release:
@echo "🧹 Removing generated files and .cr-release-packages directory"
@rm -f *.tgz *.prov fake-signing-key.asc || true
@rm -rf .cr-release-packages || true

# Makefile targets
.PHONY: minikube-start minikube-delete deploy-charts deploy-exivity-chart deploy-nfs-chart install-python-deps test
.PHONY: minikube-start minikube-delete deploy-charts deploy-exivity-chart deploy-nfs-chart install-python-deps test lint clean-release package-charts package-sign package-validate