[post-release] forcing helm chart release #5
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
name: Helm Publish | |
on: | |
push: | |
branches: | |
- 'main' | |
paths: | |
- 'helmchart/otel-add-on/Chart.yaml' | |
permissions: | |
contents: read | |
jobs: | |
noop: | |
runs-on: ubuntu-latest | |
steps: | |
- name: noop | |
run: echo "noop, because of 'The workflow must contain at least one job with no dependencies'" | |
test: | |
runs-on: ubuntu-latest | |
if: startsWith(github.event.head_commit.message, '[post-release]') | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Create k3s cluster | |
uses: AbsaOSS/k3d-action@v2 | |
with: | |
cluster-name: "test-cluster" | |
k3d-version: v5.6.0 | |
args: >- | |
--no-lb | |
--k3s-arg "--disable=traefik,servicelb,local-storage@server:*" | |
- name: Smoke test helm rendering and deployability (otel addon chart) | |
run: | | |
set -o pipefail | |
helm template ./helmchart/otel-add-on | kubectl apply -f - | |
sleep 10 | |
kubectl rollout status --timeout=300s deploy/otel-add-on-scaler | |
kubectl rollout status --timeout=300s deploy/otelcol | |
echo -e "\n\n\n pods:\n\n" | |
kubectl get pods -A | |
publish: | |
runs-on: ubuntu-latest | |
if: startsWith(github.event.head_commit.message, '[post-release]') | |
needs: [test] | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Publish Helm chart | |
uses: stefanprodan/helm-gh-pages@master | |
with: | |
token: ${{ secrets.PAT_TOKEN }} | |
charts_dir: "." | |
- name: Create k3s cluster | |
if: inputs.keda == 'true' | |
uses: AbsaOSS/k3d-action@v2 | |
with: | |
cluster-name: "test-cluster" | |
k3d-version: v5.6.0 | |
args: >- | |
--no-lb | |
--k3s-arg "--disable=traefik,servicelb,local-storage@server:*" | |
- name: Smoke test helm installation | |
if: inputs.keda == 'true' | |
run: | | |
# exp-backoff - we wait for pages to become available here | |
for i in $(seq 16) | |
do | |
_sec=$(echo "1.5^$i" | bc) | |
echo "Waiting ${_sec} seconds.." | |
sleep ${_sec} | |
helm repo add kedify-otel https://kedify.github.io/otel-add-on || continue | |
helm repo update | |
set -x | |
helm upgrade -i keda-otel-add-on kedify-otel/otel-add-on \ | |
-n keda \ | |
--create-namespace \ | |
--version=$(make version) \ | |
--timeout 300s \ | |
--wait && break | |
set +x | |
[ "$i" = "16" ] && exit 1 | |
done | |
kubectl rollout status -nkeda --timeout=300s deploy/otel-add-on-scaler | |
kubectl rollout status -nkeda --timeout=300s deploy/otelcol | |
echo -e "\n\n\n pods:\n\n" | |
kubectl get pods -A | |
echo "::group::values.yaml" | |
helm get values -n keda otel-add-on | |
echo "::endgroup::" | |
echo "::group::resulting YAML manifests" | |
helm get manifest -n keda otel-add-on | |
echo "::endgroup::" |