Skip to content

Commit 061d496

Browse files
authored
Merge pull request #5794 from duncdrum/fix-ci-logging
CI Tweaks
2 parents 9fb309b + 9aeb089 commit 061d496

File tree

2 files changed

+29
-9
lines changed

2 files changed

+29
-9
lines changed

.github/workflows/ci-container.yml

Lines changed: 29 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,16 @@
11
name: Publish Container
2-
on: [push, pull_request]
2+
on:
3+
push:
4+
pull_request:
5+
schedule:
6+
- cron: "0 6 * * *"
7+
workflow_dispatch:
8+
39
jobs:
410
build:
511
name: Test and Publish Container Images
612
runs-on: ubuntu-latest
713
# NOTE (DP): Publish on develop and master, test on PRs against these
8-
# TODO(DP) Reinstate CRONed release builds to update stock apps regularly
914
if: github.ref == 'refs/heads/develop' || github.ref == 'refs/heads/master' || github.base_ref == 'develop' || github.base_ref == 'master'
1015
steps:
1116
- uses: actions/checkout@v4
@@ -19,7 +24,7 @@ jobs:
1924
- name: Set up QEMU
2025
uses: docker/setup-qemu-action@v3
2126
with:
22-
platforms: linux/amd64,linux/arm64
27+
platforms: linux/amd64,linux/arm64
2328
- name: Make buildkit default
2429
uses: docker/setup-buildx-action@v3
2530
id: buildx
@@ -36,20 +41,38 @@ jobs:
3641
# Hack around #5450
3742
- name: pull base image
3843
run: |
39-
docker pull --platform linux/amd64 --platform linux/arm64 gcr.io/distroless/java21-debian12:latest
44+
docker pull --platform linux/amd64 --platform linux/arm64 gcr.io/distroless/java21-debian12:latest
4045
- name: Build images
4146
run: mvn -V -B -q -Pdocker -DskipTests -Ddependency-check.skip=true -P !mac-dmg-on-unix,!installer,!concurrency-stress-tests,!micro-benchmarks,skip-build-dist-archives clean package
4247
- name: Check local images
4348
run: docker image ls
4449
- name: Check license headers
4550
run: mvn license:check
46-
working-directory: exist-docker
51+
working-directory: exist-docker
4752
- name: Start exist-ci container
4853
run: |
4954
docker run -dit -p 8080:8080 --name exist-ci --rm existdb/existdb:latest
5055
sleep 35s
5156
- name: Run tests
5257
run: bats --tap exist-docker/src/test/bats/*.bats
58+
59+
- name: debug logs
60+
if: failure()
61+
run: docker logs exist-ci | grep 'ERROR'
62+
63+
- name: Copy logs on failure
64+
if: failure()
65+
run: |
66+
echo "Copying logs..."
67+
docker cp exist-ci:/exist/logs/exist.log ./exist.log
68+
69+
- name: Upload logs artifact
70+
if: failure()
71+
uses: actions/upload-artifact@v4
72+
with:
73+
name: exist-core-failed-log
74+
path: exist.log
75+
5376
# NOTE (DP): When on master push release, when on develop push latest: Version is included automatically
5477
# TODO (DP): Confirm that releases triggered from maven publish images with the non SNAPSHOT version
5578
- name: Publish latest images
@@ -76,5 +99,4 @@ jobs:
7699
# DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
77100
# DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
78101
# run: mvn -q -Ddocker.tag=experimental -Ddocker.username=$DOCKER_USERNAME -Ddocker.password=$DOCKER_PASSWORD docker:build docker:push
79-
# working-directory: ./exist-docker
80-
102+
# working-directory: ./exist-docker

.github/workflows/sonarcloud.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ on:
44
branches:
55
- develop
66
- master
7-
pull_request:
8-
types: [opened, synchronize, reopened]
97
jobs:
108
build:
119
name: SonarCloud Analysis

0 commit comments

Comments
 (0)