Skip to content

Commit 1f38f0d

Browse files
mdelapenyakiview
andauthored
chore(ci): add docker install type to the Slack payload (#8843)
Co-authored-by: Kevin Wittek <[email protected]>
1 parent c491f6a commit 1f38f0d

File tree

1 file changed

+18
-33
lines changed

1 file changed

+18
-33
lines changed

.github/workflows/moby-latest.yml

Lines changed: 18 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -6,54 +6,38 @@ on:
66
- cron: '59 23 * * *'
77

88
jobs:
9-
test_stable_docker:
10-
name: "Core tests using stable Docker-CE"
9+
test_docker:
10+
strategy:
11+
matrix:
12+
install-docker-type: ["STABLE", "ROOTLESS", "ROOTFUL"]
13+
name: "Core tests using Docker ${{ matrix.install-docker-type }}"
1114
runs-on: ubuntu-22.04
15+
continue-on-error: true
1216
steps:
1317
- uses: actions/checkout@v4
1418
- uses: ./.github/actions/setup-build
1519

1620
- name: Install Stable Docker
21+
if: ${{ matrix.install-docker-type == "STABLE" }}
1722
run: curl https://get.docker.com
1823

19-
- name: Check Docker version
20-
run: docker version
21-
22-
- name: Build with Gradle
23-
run: ./gradlew cleanTest --no-daemon --continue --scan -Dscan.tag.DOCKER_STABLE testcontainers:test -Dorg.gradle.caching=false
24-
- uses: ./.github/actions/setup-junit-report
25-
26-
- name: Notify to Slack on failures
27-
if: failure()
28-
id: slack
29-
uses: slackapi/[email protected]
30-
with:
31-
payload: |
32-
{
33-
"tc_project": "testcontainers-java",
34-
"tc_github_action_url": "https://github.com/testcontainers/testcontainers-java/actions/runs/${{ env.GITHUB_RUN_ID }}/job/${{ env.GITHUB_RUN_NUMBER }}",
35-
"tc_github_action_status": "FAILED",
36-
"tc_slack_channel_id": "${{ secrets.SLACK_DOCKER_LATEST_CHANNEL_ID }}"
37-
}
38-
env:
39-
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_DOCKER_LATEST_WEBHOOK }}
24+
- name: Install Docker from the TEST channel
25+
if: ${{ matrix.install-docker-type == "ROOTFUL" }}
26+
run: curl https://get.docker.com | CHANNEL=test sh
4027

41-
test_latest_docker:
42-
name: "Core tests using latest Docker-CE"
43-
runs-on: ubuntu-22.04
44-
steps:
45-
- uses: actions/checkout@v4
46-
- uses: ./.github/actions/setup-build
28+
- name: Setup rootless Docker
29+
if: ${{ matrix.install-docker-type == "ROOTLESS" }}
30+
uses: ScribeMD/rootless-docker@6bd157a512c2fafa4e0243a8aa87d964eb890886 # v0.2.2
4731

48-
- name: Install Latest Docker
49-
run: curl https://get.docker.com | CHANNEL=test sh
32+
- name: Remove Docker root socket
33+
if: ${{ matrix.install-docker-type == "ROOTLESS" }}
34+
run: sudo rm -rf /var/run/docker.sock
5035

5136
- name: Check Docker version
5237
run: docker version
5338

5439
- name: Build with Gradle
55-
run: ./gradlew cleanTest --no-daemon --continue --scan -Dscan.tag.DOCKER_LATEST testcontainers:test -Dorg.gradle.caching=false
56-
40+
run: ./gradlew cleanTest --no-daemon --continue --scan -Dscan.tag.DOCKER_${{ matrix.install-docker-type }} testcontainers:test -Dorg.gradle.caching=false
5741
- uses: ./.github/actions/setup-junit-report
5842

5943
- name: Notify to Slack on failures
@@ -64,6 +48,7 @@ jobs:
6448
payload: |
6549
{
6650
"tc_project": "testcontainers-java",
51+
"tc_docker_install_type": "${{ matrix.install-docker-type }}",
6752
"tc_github_action_url": "https://github.com/testcontainers/testcontainers-java/actions/runs/${{ env.GITHUB_RUN_ID }}/job/${{ env.GITHUB_RUN_NUMBER }}",
6853
"tc_github_action_status": "FAILED",
6954
"tc_slack_channel_id": "${{ secrets.SLACK_DOCKER_LATEST_CHANNEL_ID }}"

0 commit comments

Comments
 (0)