diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0d308f13d..afa811732 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -179,6 +179,7 @@ jobs: CONTAINER_NGINX_IMAGE_REGISTRY="docker-registry.nginx.com" \ TAG="${{ matrix.container.version }}-${{ matrix.container.image }}" \ OS_RELEASE="${{ matrix.container.release }}" OS_VERSION="${{ matrix.container.version }}" \ + NGINX_LICENSE_JWT="${{ secrets.NGINX_LICENSE_JWT }}" \ make official-image-integration-test official-plus-image-integration-tests: @@ -190,25 +191,15 @@ 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" - release: "debian" - path: "/nginx-plus/agent" - - image: "debian" - version: "bookworm" - plus: "r31" - release: "debian" - path: "/nginx-plus/agent" steps: - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0 @@ -232,6 +223,7 @@ jobs: CONTAINER_NGINX_IMAGE_REGISTRY="${{ secrets.REGISTRY_URL }}" \ TAG="${{ 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.NGINX_LICENSE_JWT }}" \ make official-image-integration-test performance-tests: diff --git a/test/helpers/test_containers_utils.go b/test/helpers/test_containers_utils.go index f90ab3182..2df3c1275 100644 --- a/test/helpers/test_containers_utils.go +++ b/test/helpers/test_containers_utils.go @@ -8,6 +8,7 @@ package helpers import ( "context" "io" + "os" "testing" "github.com/docker/docker/api/types" @@ -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: "../../../", @@ -87,6 +96,7 @@ func StartContainer( FileMode: configFilePermissions, }, }, + Env: env, } container, err := testcontainers.GenericContainer(ctx, testcontainers.GenericContainerRequest{