Skip to content

Commit 2694cbf

Browse files
committed
[ci] upload log on failure
backport of #5794
1 parent 91f7107 commit 2694cbf

File tree

1 file changed

+23
-2
lines changed

1 file changed

+23
-2
lines changed

.github/workflows/ci-deploy.yml

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
11
name: Deploy
2-
on: [push, pull_request]
2+
on:
3+
push:
4+
pull_request:
5+
schedule:
6+
- cron: "0 6 * * *"
7+
workflow_dispatch:
38
jobs:
49
build:
510
name: Build and Test Images
611
runs-on: ubuntu-latest
712
# NOTE (DP): Publish on develop and master, test on PRs against these
8-
# TODO(DP) Reinstate CRONed release builds to update stock apps regularly
913
if: github.ref == 'refs/heads/develop' || github.ref == 'refs/heads/develop-6.x.x' || github.ref == 'refs/heads/master'|| github.base_ref == 'develop' || github.base_ref == 'develop-6.x.x' || github.base_ref == 'master'
1014
steps:
1115
- uses: actions/checkout@v4
@@ -46,6 +50,23 @@ jobs:
4650
sleep 35s
4751
- name: Run tests
4852
run: bats --tap exist-docker/src/test/bats/*.bats
53+
54+
- name: debug logs
55+
if: failure()
56+
run: docker logs exist-ci | grep 'ERROR'
57+
58+
- name: Copy logs on failure
59+
if: failure()
60+
run: |
61+
echo "Copying logs..."
62+
docker cp exist-ci:/exist/logs/exist.log ./exist.log
63+
64+
- name: Upload logs artifact
65+
if: failure()
66+
uses: actions/upload-artifact@v4
67+
with:
68+
name: exist-core-failed-log
69+
path: exist.log
4970
# NOTE (DP): When on master push release, when on develop push latest: Version is included automatically
5071
# TODO (DP): Confirm that releases triggered from maven publish images with the non SNAPSHOT version
5172
- name: Publish latest images

0 commit comments

Comments
 (0)