Skip to content
Merged
Show file tree
Hide file tree
Changes from 42 commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
bb872d2
update nginx plus in workflow
spencerugbo Aug 13, 2025
da8471c
update protoc version
spencerugbo Aug 13, 2025
67dae8e
fix docker registry login
spencerugbo Aug 13, 2025
cd249ff
fix plus version in container matrix
spencerugbo Aug 13, 2025
699e839
test plus version as variable
spencerugbo Aug 14, 2025
84a7f0f
fix for setting plus version
spencerugbo Aug 14, 2025
8a1a3c1
use JWT for authentication
spencerugbo Aug 15, 2025
d06ec39
add jwt as env variable
spencerugbo Aug 15, 2025
2bec6fc
cleanup
spencerugbo Aug 15, 2025
e4bc9b9
cleanup
spencerugbo Aug 15, 2025
b580981
fix jwt env name
spencerugbo Aug 15, 2025
ee1d346
add jwt license to container
spencerugbo Aug 15, 2025
147eb9d
properly pass variable from host to container
spencerugbo Aug 15, 2025
1973846
small change to run command
spencerugbo Aug 18, 2025
3ad88a5
cleanup
spencerugbo Aug 18, 2025
7e87c98
added jwt variable to makefile command
spencerugbo Aug 18, 2025
681116e
add environment variable definition to workflow
spencerugbo Aug 18, 2025
5c3749f
add jwt to directory in container
spencerugbo Aug 18, 2025
44dcb36
add debug log
spencerugbo Aug 18, 2025
bdc601c
test other plus versions
spencerugbo Aug 18, 2025
f8c0180
test plus r34
spencerugbo Aug 18, 2025
b4db722
add debug log
spencerugbo Aug 19, 2025
c4b6d77
cleanup
spencerugbo Aug 19, 2025
3c9d395
add jwt definition to makefile
spencerugbo Aug 19, 2025
ef08b53
cleanup
spencerugbo Aug 19, 2025
488cef2
fix container matrix
spencerugbo Aug 19, 2025
ece3333
Merge branch 'main' into update-nginx-plus-in-integration-tests
spencerugbo Aug 19, 2025
2e626e9
Update ci.yml
spencerugbo Aug 19, 2025
3ea6180
Update ci.yml
spencerugbo Aug 20, 2025
a493038
Update ci.yml
spencerugbo Aug 20, 2025
8118aaf
Update ci.yml
spencerugbo Aug 20, 2025
6aa549b
update makefile
spencerugbo Aug 20, 2025
eefabe5
use jwt to login
spencerugbo Aug 20, 2025
ac9f409
revert login
spencerugbo Sep 2, 2025
217d0f1
cleanup
spencerugbo Sep 2, 2025
86e614e
Merge branch 'main' into update-nginx-plus-in-integration-tests
spencerugbo Sep 2, 2025
c440fe1
test working JWT
spencerugbo Sep 3, 2025
69fb4ef
test with v3
spencerugbo Sep 3, 2025
621c0c6
add debian image back to test
spencerugbo Sep 3, 2025
e2e64c5
add prefix to image tags
spencerugbo Sep 4, 2025
66046db
test only debian images
spencerugbo Sep 4, 2025
dc10a4c
change used registry
spencerugbo Sep 4, 2025
8037b13
Update ci.yml
spencerugbo Sep 9, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 10 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -218,23 +218,23 @@ jobs:
matrix:
container:
- image: "alpine"
version: "3.20"
plus: "r32"
version: "3.22"
plus: "r35"
release: "alpine"
path: "/nginx-plus/agent"
- image: "alpine"
version: "3.19"
plus: "r31"
version: "3.21"
plus: "r34"
release: "alpine"
path: "/nginx-plus/agent"
- image: "debian"
version: "bookworm"
plus: "r32"
plus: "r35"
release: "debian"
path: "/nginx-plus/agent"
- image: "debian"
version: "bookworm"
plus: "r31"
plus: "r34"
release: "debian"
path: "/nginx-plus/agent"
steps:
Expand All @@ -251,7 +251,7 @@ jobs:
- name: Login to Docker Registry
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0
with:
registry: ${{ secrets.REGISTRY_URL }}
registry: ${{ secrets.TEST_REGISTRY_URL }}
username: ${{ secrets.REGISTRY_USERNAME }}
password: ${{ secrets.REGISTRY_PASSWORD }}

Expand All @@ -266,9 +266,10 @@ jobs:
- name: Run Integration Tests
run: |
go install github.com/goreleaser/nfpm/v2/cmd/nfpm@${{ env.NFPM_VERSION }}
CONTAINER_NGINX_IMAGE_REGISTRY="${{ secrets.REGISTRY_URL }}" \
TAG="${{ matrix.container.plus }}-${{ matrix.container.image }}-${{ matrix.container.version }}" \
CONTAINER_NGINX_IMAGE_REGISTRY="${{ secrets.TEST_REGISTRY_URL }}" \
TAG="nginx-plus-${{ matrix.container.plus }}-${{ matrix.container.image }}-${{ matrix.container.version }}" \
OS_RELEASE="${{ matrix.container.release }}" OS_VERSION="${{ matrix.container.version }}" IMAGE_PATH="${{ matrix.container.path }}" \
NGINX_LICENSE_JWT='${{ secrets.TEST_JWT }}' \
make official-image-integration-test | tee ${{github.workspace}}/test/dashboard/logs/${{github.job}}/${{matrix.container.image}}-${{matrix.container.version}}/raw_logs.log
exit "${PIPESTATUS[0]}"

Expand Down
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ DOCKERFILE_PATH = "./test/docker/nginx-oss/$(CONTAINER_OS_TYPE)/Dockerfile"
OFFICIAL_IMAGE_DOCKERFILE_PATH = "./test/docker/nginx-official-image/$(CONTAINER_OS_TYPE)/Dockerfile"
IMAGE_PATH ?= "/nginx/agent"
TAG ?= ""
NGINX_LICENSE_JWT ?= ""

BUILD_DIR := build
TEST_BUILD_DIR := build/test
Expand Down Expand Up @@ -170,6 +171,7 @@ official-image-integration-test: $(SELECTED_PACKAGE) build-mock-management-plane
TEST_ENV="Container" CONTAINER_OS_TYPE=$(CONTAINER_OS_TYPE) CONTAINER_NGINX_IMAGE_REGISTRY=${CONTAINER_NGINX_IMAGE_REGISTRY} BUILD_TARGET="install" \
PACKAGES_REPO=$(OSS_PACKAGES_REPO) TAG=${TAG} PACKAGE_NAME=$(PACKAGE_NAME) BASE_IMAGE=$(BASE_IMAGE) DOCKERFILE_PATH=$(OFFICIAL_IMAGE_DOCKERFILE_PATH) \
OS_VERSION=$(OS_VERSION) OS_RELEASE=$(OS_RELEASE) IMAGE_PATH=$(IMAGE_PATH) \
NGINX_LICENSE_JWT=$(NGINX_LICENSE_JWT) \
go test -v ./test/integration/managementplane ./test/integration/auxiliarycommandserver

performance-test:
Expand Down
10 changes: 10 additions & 0 deletions test/helpers/test_containers_utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ package helpers
import (
"context"
"io"
"os"
"testing"

"github.com/docker/docker/api/types"
Expand Down Expand Up @@ -44,6 +45,14 @@ func StartContainer(
tag := Env(tb, "TAG")
imagePath := Env(tb, "IMAGE_PATH")

var env map[string]string
if os.Getenv("NGINX_LICENSE_JWT") != "" {
nginxLicenseJwt := os.Getenv("NGINX_LICENSE_JWT")
env = map[string]string{
"NGINX_LICENSE_JWT": nginxLicenseJwt,
}
}

req := testcontainers.ContainerRequest{
FromDockerfile: testcontainers.FromDockerfile{
Context: "../../../",
Expand Down Expand Up @@ -87,6 +96,7 @@ func StartContainer(
FileMode: configFilePermissions,
},
},
Env: env,
}

container, err := testcontainers.GenericContainer(ctx, testcontainers.GenericContainerRequest{
Expand Down