Skip to content

Commit 6b7e974

Browse files
committed
add more artifacts
1 parent 0005c3d commit 6b7e974

File tree

1 file changed

+36
-12
lines changed

1 file changed

+36
-12
lines changed

.github/workflows/ci.yml

Lines changed: 36 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -92,12 +92,24 @@ jobs:
9292
name: Component Tests
9393
runs-on: ubuntu-24.04
9494
steps:
95+
- name: Set start time
96+
run: echo "START_TIME=$(date +"%Y-%m-%dT%H:%M:%S.%NZ")" >> ${GITHUB_ENV}
9597
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
9698
- uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
9799
with:
98100
go-version-file: 'go.mod'
99101
- name: Run Component Tests
100-
run: make component-test
102+
run: make component-test > component-test-output.json
103+
- name: Set Component Test Outputs
104+
if: success() || failure()
105+
run: bash ./scripts/workflow/format_workflow_outputs.sh ${{ job.status }} ${{ env.START_TIME }} component-test-output.json component-test-result.json
106+
- name: Upload Artifact
107+
if: success() || failure()
108+
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
109+
with:
110+
name: component-test-status
111+
path: component-test-result.json
112+
retention-days: 1
101113

102114
build-unsigned-snapshot:
103115
name: Build unsigned snapshot
@@ -174,6 +186,8 @@ jobs:
174186
- image: "debian"
175187
version: "bookworm-slim"
176188
steps:
189+
- name: Set start time
190+
run: echo "START_TIME=$(date +"%Y-%m-%dT%H:%M:%S.%NZ")" >> ${GITHUB_ENV}
177191
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
178192
with:
179193
fetch-depth: 0
@@ -195,15 +209,25 @@ jobs:
195209
run: |
196210
docker ps -a
197211
dockerid=$(docker ps -a --format "{{.ID}}")
198-
docker logs "$dockerid"
199-
212+
docker logs "$dockerid" > int-test-output.json
200213
- name: Archive integration test logs
201214
if: success() || failure()
202215
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
203216
with:
204217
name: result-integration-test-logs-${{ matrix.container.image }}-${{ matrix.container.version }}
205218
path: /tmp/integration-test-logs
206219
retention-days: 3
220+
221+
- name: Set Component Test Outputs
222+
if: success() || failure()
223+
run: bash ./scripts/workflow/format_workflow_outputs.sh ${{ job.status }} ${{ env.START_TIME }} int-test-output.json int-test-result.json
224+
- name: Upload Artifact
225+
if: success() || failure()
226+
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
227+
with:
228+
name: integration-test-status
229+
path: integration-test-result.json
230+
retention-days: 1
207231

208232
official-oss-image-integration-tests:
209233
name: Integration Tests - Official OSS Images
@@ -435,12 +459,12 @@ jobs:
435459
pull-requests: write
436460

437461

438-
# merge-artifacts:
439-
# runs-on: ubuntu-22.04
440-
# needs: [lint, unit-test, component-test, performance-test, integration-tests, official-plus-image-integration-tests, official-oss-image-integration-tests]
441-
# steps:
442-
# - name: Merge Artifacts
443-
# if: success() || failure()
444-
# uses: actions/upload-artifact/merge@v4
445-
# with:
446-
# name: ci-workflow-logs
462+
merge-artifacts:
463+
runs-on: ubuntu-22.04
464+
needs: [lint, unit-test, component-test, integration-tests]
465+
steps:
466+
- name: Merge Artifacts
467+
if: success() || failure()
468+
uses: actions/upload-artifact/merge@v4
469+
with:
470+
name: ci-workflow-logs

0 commit comments

Comments
 (0)