From f67fab1f1480a5df58644de9914928109cbea2aa Mon Sep 17 00:00:00 2001 From: Joel Studler Date: Thu, 19 Jun 2025 11:29:03 +0200 Subject: [PATCH 1/2] Bump NetBox e2e test version from 4.1.8 to 4.1.11 --- .github/workflows/e2e-tests.yaml | 6 +++--- Makefile | 10 +++++----- .../examples/example5-multicluster/prepare-demo-env.sh | 2 +- kind/deploy-netbox.sh | 4 ++-- kind/local-env.sh | 2 +- 5 files changed, 12 insertions(+), 12 deletions(-) diff --git a/.github/workflows/e2e-tests.yaml b/.github/workflows/e2e-tests.yaml index c065814c..81e0e3ea 100644 --- a/.github/workflows/e2e-tests.yaml +++ b/.github/workflows/e2e-tests.yaml @@ -42,8 +42,8 @@ jobs: - name: Run e2e tests run: | make test-e2e-4.0.11 - e2e-tests-4-1-8: - name: Against netbox version 4.1.8 + e2e-tests-4-1-11: + name: Against netbox version 4.1.11 runs-on: ubuntu-latest steps: - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 @@ -55,4 +55,4 @@ jobs: cat ".github/env" >> "$GITHUB_ENV" - name: Run e2e tests run: | - make test-e2e-4.1.8 + make test-e2e-4.1.11 diff --git a/Makefile b/Makefile index e8dcbc60..e42750bf 100644 --- a/Makefile +++ b/Makefile @@ -254,9 +254,9 @@ create-kind-4.0.11: test-e2e-4.0.11: create-kind-4.0.11 deploy-kind install-$(GO_PACKAGE_NAME_CHAINSAW) chainsaw test $(E2E_PARAM) -.PHONY: create-kind-4.1.8 -create-kind-4.1.8: - ./kind/local-env.sh --version 4.1.8 -.PHONY: test-e2e-4.1.8 -test-e2e-4.1.8: create-kind-4.1.8 deploy-kind install-$(GO_PACKAGE_NAME_CHAINSAW) +.PHONY: create-kind-4.1.11 +create-kind-4.1.11: + ./kind/local-env.sh --version 4.1.11 +.PHONY: test-e2e-4.1.11 +test-e2e-4.1.11: create-kind-4.1.11 deploy-kind install-$(GO_PACKAGE_NAME_CHAINSAW) chainsaw test $(E2E_PARAM) diff --git a/docs/examples/example5-multicluster/prepare-demo-env.sh b/docs/examples/example5-multicluster/prepare-demo-env.sh index 67db95f6..f4fcf075 100755 --- a/docs/examples/example5-multicluster/prepare-demo-env.sh +++ b/docs/examples/example5-multicluster/prepare-demo-env.sh @@ -5,7 +5,7 @@ set -e # install netbox in the london cluster and load demo data kubectl config use-context kind-london -./kind/deploy-netbox.sh london "4.1.8" default +./kind/deploy-netbox.sh london "4.1.11" default # install NetBox Operator kubectl config use-context kind-london diff --git a/kind/deploy-netbox.sh b/kind/deploy-netbox.sh index 1d11d05f..e940fd72 100755 --- a/kind/deploy-netbox.sh +++ b/kind/deploy-netbox.sh @@ -69,13 +69,13 @@ elif [[ "${VERSION}" == "4.0.11" ]] ;then # patch load-data.sh sed 's/netbox-demo-v4.1.sql/netbox-demo-v4.0.sql/g' $SCRIPT_DIR/load-data-job/load-data.orig.sh > $SCRIPT_DIR/load-data-job/load-data.sh && chmod +x $SCRIPT_DIR/load-data-job/load-data.sh -elif [[ "${VERSION}" == "4.1.8" ]] ;then +elif [[ "${VERSION}" == "4.1.11" ]] ;then echo "Using version ${VERSION}" # need to align with netbox-chart otherwise the creation of the cluster will hang declare -a Remote_Images=( \ "busybox:1.37.0" \ "docker.io/bitnami/redis:7.4.1-debian-12-r2" \ - "ghcr.io/netbox-community/netbox:v4.1.8" \ + "ghcr.io/netbox-community/netbox:v4.1.11" \ "ghcr.io/zalando/postgres-operator:v1.12.2" \ "ghcr.io/zalando/spilo-16:3.2-p3" \ ) diff --git a/kind/local-env.sh b/kind/local-env.sh index 3eb01e6d..273dda08 100755 --- a/kind/local-env.sh +++ b/kind/local-env.sh @@ -2,7 +2,7 @@ set -e -u -o pipefail NAMESPACE="" -VERSION="4.1.8" # default value +VERSION="4.1.11" # default value while [[ $# -gt 0 ]]; do case $1 in -n|--namespace) From 9aa26c449965909f46879467c040061fd7dc0545 Mon Sep 17 00:00:00 2001 From: jstudler Date: Thu, 19 Jun 2025 11:34:41 +0200 Subject: [PATCH 2/2] Potential fix for code scanning alert no. 4: Workflow does not contain permissions Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> --- .github/workflows/e2e-tests.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/e2e-tests.yaml b/.github/workflows/e2e-tests.yaml index 81e0e3ea..bc409064 100644 --- a/.github/workflows/e2e-tests.yaml +++ b/.github/workflows/e2e-tests.yaml @@ -1,5 +1,7 @@ # Modified from https://github.com/prometheus-operator/prometheus-operator/blob/main/.github/workflows/e2e-feature-gated.yaml name: e2e-tests +permissions: + contents: read on: push: branches: