fix(GrafanaFolder): proper status updates for removed CRs, don't fail on missing folder in onFolderDeleted events #1194
Workflow file for this run
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: KinD End-to-End | |
on: | |
pull_request: | |
branches: [master] | |
env: | |
NAME: grafana-operator | |
NAMESPACE: grafana-operator-system | |
jobs: | |
docs_only_check: | |
name: Check for docs-only change | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
outputs: | |
docs_only: ${{ steps.docs_only_check.outputs.docs_only }} | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- id: changed-files | |
name: Get changed files | |
uses: tj-actions/changed-files@0874344d6ebbaa00a27da73276ae7162fadcaf69 #v44.3.0 | |
with: | |
files_ignore: | | |
**/*.md | |
**/*.html | |
hugo/** | |
- id: which_files | |
name: Which files was changed | |
run: | | |
echo "One or more files has changed." | |
echo "List all the files that have changed: ${{ steps.changed-files.outputs.all_changed_files }}" | |
echo "What is any changed ${{ steps.changed-files.outputs.any_changed }}" | |
- id: docs_only_check | |
if: steps.changed-files.outputs.any_changed != 'true' | |
name: Check for docs-only changes | |
run: echo "docs_only=true" >> $GITHUB_OUTPUT | |
end-to-end: | |
runs-on: ubuntu-latest | |
needs: | |
- docs_only_check | |
if: (needs.docs_only_check.outputs.docs_only != 'true') | |
env: | |
KUBECONFIG: /home/runner/.kube/kind-grafana-operator-e2e | |
steps: | |
- name: Clone repo and checkout | |
uses: actions/checkout@v4 | |
- name: Install go | |
uses: actions/setup-go@v5 | |
with: | |
go-version-file: "go.mod" | |
cache: true | |
- name: Install ko | |
uses: ko-build/setup-ko@v0.6 | |
with: | |
version: v0.13.0 | |
- name: Install chainsaw | |
uses: kyverno/action-install-chainsaw@v0.1.9 | |
- name: Create KinD cluster | |
id: kind | |
run: | | |
kind --kubeconfig="${KUBECONFIG}" create cluster --image=kindest/node:v1.25.3 --config tests/e2e/kind.yaml | |
- name: Build and load images | |
env: | |
KO_DOCKER_REPO: ko.local/grafana/grafana-operator | |
run: | | |
set -e | |
ko build --sbom=none --bare | |
kind load docker-image "$KO_DOCKER_REPO" | |
- name: Run e2e tests | |
shell: bash | |
run: | | |
# install chainsaw | |
make chainsaw | |
# Run e2e | |
VERSION=latest make e2e | |
- name: Debug failure | |
if: failure() | |
run: | | |
set -e | |
kubectl version | |
kubectl -n $NAMESPACE get all | |
kubectl -n $NAMESPACE get grafana | |
kubectl get crd | |
POD=$(kubectl get pods -n $NAMESPACE -l app.kubernetes.io/name=grafana-operator --output='jsonpath={.items[].metadata.name}') | |
echo "pod logs" | |
kubectl logs -n $NAMESPACE $POD -c manager | |
echo "previous pod logs (if any)" | |
kubectl logs -p -n $NAMESPACE $POD -c manager || true |