forked from hstreamdb/jepsen.hstream
-
Notifications
You must be signed in to change notification settings - Fork 0
67 lines (58 loc) · 1.97 KB
/
ci_repo_dispatch_hornbill.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
name: Jepsen CI on Repository Dispatch (Hornbill)
on:
repository_dispatch:
branches: [master]
types: hornbill_image_updated
jobs:
hornbill-test:
runs-on: ubuntu-latest
name: Jepsen test for hornbill
timeout-minutes: 20
steps:
- uses: actions/checkout@v2
with:
submodules: "recursive"
- name: Prepare environment for test
run: |
cd ./docker
./init-secret.sh
- name: Build base image
run: |
./scripts/build_hornbill_base.sh
- name: Build test images (hornbill)
run: |
./scripts/build_hornbill.sh
- name: Check disk space
run: |
df -h
- name: Start test cluster and run jepsen test (hornbill)
run: |
./scripts/up_hornbill.sh
- name: Cleanup resources (hornbill)
run: |
./scripts/clean_hornbill.sh
- name: Upload Artifact
uses: actions/upload-artifact@v4
if: ${{ success() }} || ${{ failure() }}
with:
name: hornbill-result
path: |
store/
/tmp/*.log
!store/current/
!store/latest/
retention-days: 7
- name: Post to Slack channel
if: ${{ success() }} || ${{ failure() }}
run: |
if [ "${{ job.status }}" = 'success' ]
then JOB_STATUS_EMOJI=':white_check_mark:'
else JOB_STATUS_EMOJI=':x:'
fi
curl \
-X POST \
-H 'Content-Type: application/json' \
${{ secrets.SLACK_WEBHOOK_URL }} \
--data '{"GitHub Action build result": "${{ job.status }} '"$JOB_STATUS_EMOJI"'",
"Commit info": "https://github.com/hstreamdb/hornbill/commit/${{ github.event.client_payload.commit_sha }}",
"Action summary": "https://github.com/'"$GITHUB_REPOSITORY"'/actions/runs/'"$GITHUB_RUN_ID"'"}'