Skip to content

chore(deps): update module golang.org/x/term to v0.28.0 (#496) #454

chore(deps): update module golang.org/x/term to v0.28.0 (#496)

chore(deps): update module golang.org/x/term to v0.28.0 (#496) #454

Workflow file for this run

name: e2e tests
on:
push:
branches:
- main
pull_request:
branches:
- main
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
e2e:
runs-on: ubuntu-latest
strategy:
matrix:
# https://hub.docker.com/r/kindest/node/tags
k8s_version: ["v1.28.13", "v1.29.8", "v1.30.4"]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: "go.mod"
- name: Install kind with registry
uses: bakito/kind-with-registry-action@main
with:
node_image: kindest/node:${{ matrix.k8s_version }}
kubectl_version: ${{ matrix.k8s_version }}
- name: Run Exporter from outside the cluster
run: |
echo "## Run Exporter from outside the cluster" >> $GITHUB_STEP_SUMMARY
go run . --config config.yaml --progress bar >> $GITHUB_STEP_SUMMARY
- name: Build the docker image
run: |
docker build -f Dockerfile --build-arg VERSION=e2e-tests -t localhost:5001/kubexporter:e2e .
docker push localhost:5001/kubexporter:e2e
- name: Run Exporter as k8s Job
id: run_as_k8s_job
continue-on-error: true
run: |
kubectl create ns e2e
kubectl apply -n e2e -f testdata/e2e/job-with-rbac.yaml
echo "Waiting for Job to be terminated"
kubectl wait --for=condition=complete job/kubexporter -n e2e --timeout=30s
- name: Print k8s logs
run: |
echo "## Run Exporter as k8s Job" >> $GITHUB_STEP_SUMMARY
kubectl logs -n e2e -l e2e=kubexporter --tail=10000 >> $GITHUB_STEP_SUMMARY
- name: Fail if 'Run Exporter as k8s Job' failed
if: steps.run_as_k8s_job.outcome=='failure'
run: |
echo "Step 'Run Exporter as k8s Job' failed: Check the logs as well as the job summary for errors"
exit 1