Skip to content

Commit 2f76ace

Browse files
authored
run-airbyte-ci: upload dagger engine logs to artifacts (#37623)
1 parent d84aa48 commit 2f76ace

File tree

1 file changed

+28
-1
lines changed

1 file changed

+28
-1
lines changed

.github/actions/run-airbyte-ci/action.yml

+28-1
Original file line numberDiff line numberDiff line change
@@ -147,4 +147,31 @@ runs:
147147
id: stop-engine
148148
if: always()
149149
shell: bash
150-
run: docker stop --time 300 $(docker ps --filter name="dagger-engine-*" -q)
150+
run: |
151+
mapfile -t containers < <(docker ps --filter name="dagger-engine-*" -q)
152+
if [[ "${#containers[@]}" -gt 0 ]]; then
153+
docker stop -t 300 "${containers[@]}";
154+
fi
155+
156+
- name: Collect docker logs on failure
157+
id: collect-docker-logs
158+
if: always()
159+
uses: jwalton/gh-docker-logs@v2
160+
with:
161+
dest: "./docker_logs"
162+
images: "registry.dagger.io/engine"
163+
164+
- name: Tar logs
165+
id: tar-logs
166+
if: always()
167+
shell: bash
168+
run: tar cvzf ./docker_logs.tgz ./docker_logs
169+
170+
- name: Upload logs to GitHub
171+
id: upload-docker-logs
172+
if: always()
173+
uses: actions/upload-artifact@v4
174+
with:
175+
name: docker_logs.tgz
176+
path: ./docker_logs.tgz
177+
retention-days: 7

0 commit comments

Comments
 (0)