Merge pull request #198 from redhat-cop/dependabot/github_actions/hel… #75
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: Run gatekeeper-k8s-integrationtests.sh | |
on: [push, pull_request] | |
jobs: | |
kind: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Validate integration test data via kubeval | |
uses: redhat-cop/github-actions/confbatstest@master | |
with: | |
raw: find policy/* -regex '.*test_data\/integration\/.*$' -exec kubeval --openshift --strict --skip-kinds ServiceMonitor {} \; | |
- name: Create k8s Kind Cluster | |
uses: helm/kind-action@v1.8.0 | |
- name: Test against KinD | |
run: | | |
confbatstest=$(docker images --filter=label=com.github.actions.name=confbatstest --format "{{.Repository}}:{{.Tag}}") | |
docker run --rm --network host --workdir /conftest --volume "/home/runner/.kube/":"/opt/app-root/src/.kube/" --volume "/home/runner/work/rego-policies/rego-policies":"/conftest" --entrypoint .github/workflows/tests-entrypoint.sh ${confbatstest} | |
- name: Get pods and events if tests failed | |
if: ${{ failure() }} | |
run: | | |
kubectl get nodes | |
echo "" | |
kubectl get namespaces | |
echo "" | |
kubectl get pods --all-namespaces | |
echo "" | |
kubectl get events --all-namespaces | |
echo "" | |
kubectl api-versions |