Skip to content

Ensure that NROP metrics are served securely #981

Ensure that NROP metrics are served securely

Ensure that NROP metrics are served securely #981

Workflow file for this run

name: CI E2E - for tools
on:
pull_request:
branches:
- main
- "v[0-9]+.[0-9]+.[0-9]+"
- "v[0-9]+.[0-9]+"
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
defaults:
run:
shell: bash
jobs:
e2e-tools:
runs-on: ubuntu-20.04
env:
LOG_DIR: /tmp/test_e2e_logs
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0 # Fetch all history for all tags and branches
- name: Set up golang
uses: actions/setup-go@v3
with:
go-version: 1.22.1
- name: Verify modules
run: go mod verify
- name: Reuse kustomize from the host
run: |
if kustomize version | grep -Eq 'v4\.5'; then mkdir -p bin/ && ln -s $(which kustomize) bin/kustomize; fi
- name: Build tools test binary
run: |
make binary-e2e-tools
- name: Build tools
run: |
make build-tools binary-nrovalidate
- name: Create K8s Kind Cluster
run: |
# kind is part of 20.04 image, see relevant READMEs in https://github.com/actions/virtual-environments/tree/main/images/linux
kind version
kind create cluster --config=hack/kind-config-e2e-no-registry.yaml --image kindest/node:v1.26.6@sha256:6e2d8b28a5b601defe327b98bd1c2d1930b49e5d8c512e1895099e4504007adb
kubectl label node kind-worker node-role.kubernetes.io/worker=''
- name: Deploy NUMA Resources Operator
run: |
# we only need the manifests, this happens to be the easiest way known to date
KUSTOMIZE_DEPLOY_DIR="config/kind-ci/" make deploy
- name: E2E Tests
run: |
export KUBECONFIG=${HOME}/.kube/config
kubectl create -f doc/examples/mcp.yaml
kubectl create -f doc/examples/nrop.yaml
hack/run-test-tools-e2e.sh --no-color
- name: Export E2E Tests logs
if: ${{ failure() }}
run: |
mkdir -p ${LOG_DIR}
for pod in $(kubectl get pods -n $E2E_NAMESPACE_NAME --no-headers=true -o custom-columns=NAME:.metadata.name)
do
oc logs $pod -n $E2E_NAMESPACE_NAME --all-containers=true > ${LOG_DIR}/${pod}.log
oc describe pod $pod -n $E2E_NAMESPACE_NAME > ${LOG_DIR}/${pod}.describe.log
done
- name: Archive E2E Tests logs
if: ${{ failure() }}
uses: actions/upload-artifact@v2
with:
name: test_e2e_logs
path: ${LOG_DIR}/
- name: Export kind logs
if: ${{ failure() }}
run: |
kind export logs /tmp/kind_logs
- name: Archive kind logs
if: ${{ failure() }}
uses: actions/upload-artifact@v2
with:
name: kind_logs
path: /tmp/kind_logs