Skip to content

Commit 2288124

Browse files
committed
merge artifacts
1 parent 6b7e974 commit 2288124

File tree

1 file changed

+42
-8
lines changed

1 file changed

+42
-8
lines changed

.github/workflows/ci.yml

Lines changed: 42 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ jobs:
226226
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
227227
with:
228228
name: integration-test-status
229-
path: integration-test-result.json
229+
path: int-test-result.json
230230
retention-days: 1
231231

232232
official-oss-image-integration-tests:
@@ -272,8 +272,7 @@ jobs:
272272
run: |
273273
docker ps -a
274274
dockerid=$(docker ps -a --format "{{.ID}}")
275-
docker logs "$dockerid"
276-
275+
docker logs "$dockerid" > oss-logs-output.log
277276
- name: Archive integration test logs
278277
if: success() || failure()
279278
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
@@ -282,6 +281,17 @@ jobs:
282281
path: /tmp/integration-test-logs/
283282
retention-days: 1
284283

284+
- name: Set OSS Integration Test Outputs
285+
if: success() || failure()
286+
run: bash ./scripts/workflow/format_workflow_outputs.sh ${{ job.status }} ${{ env.START_TIME }} oss-logs-output.log oss-logs-result.json
287+
- name: Upload Artifact
288+
if: success() || failure()
289+
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
290+
with:
291+
name: oss-integration-test-status
292+
path: oss-logs-result.json
293+
retention-days: 1
294+
285295
official-plus-image-integration-tests:
286296
name: Integration Tests - Official Plus Images
287297
needs: build-unsigned-snapshot
@@ -312,6 +322,8 @@ jobs:
312322
release: "debian"
313323
path: "/nginx-plus/agent"
314324
steps:
325+
- name: Set start time
326+
run: echo "START_TIME=$(date +"%Y-%m-%dT%H:%M:%S.%NZ")" >> ${GITHUB_ENV}
315327
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
316328
with:
317329
fetch-depth: 0
@@ -340,8 +352,7 @@ jobs:
340352
run: |
341353
docker ps -a
342354
dockerid=$(docker ps -a --format "{{.ID}}")
343-
docker logs "$dockerid"
344-
355+
docker logs "$dockerid" > plus-logs-output.log
345356
- name: Archive integration test logs
346357
if: success() || failure()
347358
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
@@ -350,11 +361,24 @@ jobs:
350361
path: /tmp/integration-test-logs/
351362
retention-days: 1
352363

364+
- name: Set Plus Integration Test Outputs
365+
if: success() || failure()
366+
run: bash ./scripts/workflow/format_workflow_outputs.sh ${{ job.status }} ${{ env.START_TIME }} plus-logs-output.log plus-logs-result.json
367+
- name: Upload Artifact
368+
if: success() || failure()
369+
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
370+
with:
371+
name: plus-integration-test-status
372+
path: plus-logs-result.json
373+
retention-days: 1
374+
353375
performance-test:
354376
name: Performance Tests
355377
if: ${{ !github.event.pull_request.head.repo.fork && !startsWith(github.ref_name, 'dependabot/') }}
356378
runs-on: ubuntu-22.04
357379
steps:
380+
- name: Set start time
381+
run: echo "START_TIME=$(date +"%Y-%m-%dT%H:%M:%S.%NZ")" >> ${GITHUB_ENV}
358382
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
359383
- name: Set up Docker Build
360384
uses: docker/setup-buildx-action@d70bba72b1f3fd22344832f00baa16ece964efeb # v3.3.0
@@ -371,7 +395,17 @@ jobs:
371395
"nginx-crt=${{ secrets.NGINX_CRT }}"
372396
"nginx-key=${{ secrets.NGINX_KEY }}"
373397
- name: Run Performance Tests
374-
run: docker run -v ${GITHUB_WORKSPACE}:/home/nginx/ --rm nginx-agent-benchmark:1.0.0
398+
run: docker run -v ${GITHUB_WORKSPACE}:/home/nginx/ --rm nginx-agent-benchmark:1.0.0 > perf-test-output.json
399+
- name: Set Performance Test Outputs
400+
if: success() || failure()
401+
run: bash ./scripts/workflow/format_workflow_outputs.sh ${{ job.status }} ${{ env.START_TIME }} perf-test-output.json perf-test-result.json
402+
- name: Upload Artifact
403+
if: success() || failure()
404+
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
405+
with:
406+
name: performance-test-status
407+
path: perf-test-result.json
408+
retention-days: 1
375409

376410
build-signed-snapshot:
377411
name: Build signed snapshot
@@ -458,13 +492,13 @@ jobs:
458492
contents: write
459493
pull-requests: write
460494

461-
462495
merge-artifacts:
463496
runs-on: ubuntu-22.04
464-
needs: [lint, unit-test, component-test, integration-tests]
497+
needs: [lint, unit-test, component-test, integration-tests, performance-test, official-plus-image-integration-tests, official-oss-image-integration-tests]
465498
steps:
466499
- name: Merge Artifacts
467500
if: success() || failure()
468501
uses: actions/upload-artifact/merge@v4
469502
with:
470503
name: ci-workflow-logs
504+
delete-merged: true

0 commit comments

Comments
 (0)