Skip to content

Commit f84e9a1

Browse files
oCHRISoaphralG
andauthored
chore: upgrade actions/dependency-review-action to v4.9.0 (#1555)
* chore: upgrade actions/dependency-review-action to v4.9.0 --------- Co-authored-by: Aphral Griffin <a.griffin@f5.com>
1 parent 38e9b0d commit f84e9a1

File tree

3 files changed

+108
-3
lines changed

3 files changed

+108
-3
lines changed

.github/workflows/ci.yml

Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,101 @@ jobs:
266266
name: official-oss-integration-test-logs-${{ matrix.container.image }}-${{ matrix.container.version }}
267267
path: /tmp/integration-test-logs/
268268
retention-days: 3
269+
official-plus-image-integration-tests:
270+
name: Integration Tests - Official Plus Images
271+
needs: build-unsigned-snapshot
272+
runs-on: ubuntu-24.04
273+
permissions:
274+
id-token: write # for OIDC authentication
275+
if: ${{ !github.event.pull_request.head.repo.fork && !startsWith(github.ref_name, 'dependabot/') }}
276+
strategy:
277+
fail-fast: false
278+
matrix:
279+
container:
280+
- image: "alpine"
281+
version: "3.20"
282+
plus: "r32"
283+
release: "alpine"
284+
path: "/nginx-plus/agent"
285+
- image: "debian"
286+
version: "bookworm"
287+
plus: "r32"
288+
release: "debian"
289+
path: "/nginx-plus/agent"
290+
- image: "debian"
291+
version: "bookworm"
292+
plus: "r31"
293+
release: "debian"
294+
path: "/nginx-plus/agent"
295+
steps:
296+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
297+
with:
298+
fetch-depth: 0
299+
- uses: actions/setup-go@7a3fe6cf4cb3a834922a1244abfce67bcef6a0c5 # v6.2.0
300+
with:
301+
go-version-file: 'go.mod'
302+
- name: Download Packages
303+
uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4.1.7
304+
with:
305+
name: nginx-agent-unsigned-snapshots
306+
path: build
307+
308+
- name: Get Secrets from Agent Key Vault
309+
uses: ./.github/actions/az-sync
310+
with:
311+
az_client_id: ${{ secrets.AZ_KEYVAULT_CLIENT_ID }}
312+
az_tenant_id: ${{ secrets.AZ_KEYVAULT_TENANT_ID }}
313+
az_subscription_id: ${{ secrets.AZ_SUBSCRIPTION_ID }}
314+
keyvault: ${{ secrets.AZ_KEYVAULT_AGENT }}
315+
secrets-filter: 'artifactory'
316+
317+
- name: Sync Secrets from Common Key Vault
318+
uses: ./.github/actions/az-sync
319+
with:
320+
az_client_id: ${{ secrets.AZ_KEYVAULT_CLIENT_ID }}
321+
az_tenant_id: ${{ secrets.AZ_KEYVAULT_TENANT_ID }}
322+
az_subscription_id: ${{ secrets.AZ_SUBSCRIPTION_ID }}
323+
keyvault: ${{ secrets.AZ_KEYVAULT_COMMON }}
324+
secrets-filter: 'docker,nginx-private-registry,nginx-pkg'
325+
326+
- name: Login to Docker Registry
327+
uses: docker/login-action@5e57cd118135c172c3672efd75eb46360885c0ef # v3.6.0
328+
with:
329+
registry: ${{ env.nginx-private-registry-url }}
330+
username: ${{ env.nginx-pkg-jwt }}
331+
password: "none"
332+
333+
- name: Set Start Time
334+
run: echo "START_TIME=$(date +"%Y-%m-%dT%H:%M:%S.%NZ")" >> ${GITHUB_ENV}
335+
- name: Create Directory
336+
run: mkdir -p ${{github.workspace}}/test/dashboard/logs/${{github.job}}/${{matrix.container.image}}${{matrix.container.version}}/
337+
- name: Start Promtail
338+
uses: ./.github/actions/start-promtail
339+
with:
340+
loki-dashboard-url: ${{ secrets.LOKI_DASHBOARD_URL }}
341+
- name: Run Integration Tests
342+
run: |
343+
go install github.com/goreleaser/nfpm/v2/cmd/nfpm@${{ env.NFPM_VERSION }}
344+
CONTAINER_NGINX_IMAGE_REGISTRY="${{ env.nginx-private-registry-url }}" TAG="${{ matrix.container.plus }}-${{ matrix.container.image }}-${{ matrix.container.version }}" \
345+
OS_RELEASE="${{ matrix.container.release }}" IMAGE_PATH="${{ matrix.container.path }}" \
346+
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]}"
347+
- name: Generate Test Results
348+
if: always()
349+
run: bash ./scripts/workflow/generate_results.sh ${{job.status}} ${{env.START_TIME}} ${{github.job}}/${{matrix.container.image}}${{matrix.container.version}} ${{github.workspace}}
350+
- name: Container Output Logs
351+
if: failure()
352+
run: |
353+
docker ps -a
354+
dockerid=$(docker ps -a --format "{{.ID}}")
355+
docker logs "$dockerid"
269356
357+
- name: Archive integration test logs
358+
if: success() || failure()
359+
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
360+
with:
361+
name: official-plus-integration-test-logs-${{ matrix.container.image }}-${{ matrix.container.version }}-${{ matrix.container.plus }}
362+
path: /tmp/integration-test-logs/
363+
retention-days: 3
270364
performance-test:
271365
name: Performance Tests
272366
if: ${{ !github.event.pull_request.head.repo.fork && !startsWith(github.ref_name, 'dependabot/') }}

.github/workflows/dependency-review.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,6 @@ jobs:
2525
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
2626

2727
- name: "Dependency Review"
28-
uses: actions/dependency-review-action@5bbc3ba658137598168acb2ab73b21c432dd411b # v4.2.5
28+
uses: actions/dependency-review-action@2031cfc080254a8a887f58cffee85186f0e49e48 # v4.9.0
2929
with:
3030
config-file: "nginx/k8s-common/dependency-review-config.yml@main"

test/integration/utils/test_container_utils.go

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import (
77
"io"
88
"os"
99
"regexp"
10+
"strings"
1011
"testing"
1112

1213
"github.com/docker/docker/api/types/container"
@@ -200,7 +201,12 @@ func LogAndTerminateContainers(
200201

201202
tb.Log(logs)
202203
if expectNoErrorsInLogs {
203-
assert.NotContains(tb, logs, "level=ERROR", "agent log file contains logs at error level")
204+
for _, line := range strings.Split(logs, "\n") {
205+
if strings.Contains(line, "level=ERROR") &&
206+
!strings.Contains(line, "NGINX master process not found yet, waiting for NGINX to start...") {
207+
assert.Fail(tb, "agent log file contains logs at error level", line)
208+
}
209+
}
204210
}
205211

206212
err = agentContainer.Terminate(ctx)
@@ -267,7 +273,12 @@ func TestAgentHasNoErrorLogs(t *testing.T, agentContainer testcontainers.Contain
267273
assert.Fail(t, "failed log content for semver value passed to Agent")
268274
}
269275

270-
assert.NotContains(t, string(agentLogContent), "level=error", "agent log file contains logs at error level")
276+
for _, line := range strings.Split(string(agentLogContent), "\n") {
277+
if strings.Contains(line, "level=error") &&
278+
!strings.Contains(line, "NGINX master process not found yet, waiting for NGINX to start...") {
279+
assert.Fail(t, "agent log file contains logs at error level", line)
280+
}
281+
}
271282
assert.NotContains(t, string(agentLogContent), "level=panic", "agent log file contains logs at panic level")
272283
assert.NotContains(t, string(agentLogContent), "level=fatal", "agent log file contains logs at fatal level")
273284
}

0 commit comments

Comments
 (0)