Skip to content

[post-release] forcing helm chart release #4

[post-release] forcing helm chart release

[post-release] forcing helm chart release #4

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]')
needs: [check-if-new-version]

Check failure on line 21 in .github/workflows/release-chart.yaml

View workflow run for this annotation

GitHub Actions / Helm Publish

Invalid workflow file

The workflow is not valid. .github/workflows/release-chart.yaml (Line: 21, Col: 13): Job 'test' depends on unknown job 'check-if-new-version'. .github/workflows/release-chart.yaml (Line: 47, Col: 13): Job 'publish' depends on job 'test' which creates a cycle in the dependency graph.
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::"