Skip to content

Commit 1880ec1

Browse files
authored
Add a gatekeeper job for PR (#8771)
* Add a gatekeeper job for PR * Include circleCI * Add concurrency * Add readme
1 parent 5bfab65 commit 1880ec1

File tree

2 files changed

+43
-0
lines changed

2 files changed

+43
-0
lines changed

.github/workflows/README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,13 @@ _Action:_ Build the Java Client Library and runs [the system tests](https://gith
137137

138138
_Recovery:_ Manually trigger the action on the desired branch.
139139

140+
### all-green [🔗](all-green.yaml)
141+
142+
_Trigger:_ Any pull request.
143+
144+
_Action:_ This action will check all other jobs (Github action, Gitlab, CircleCi), and will fail if any of them fails. This action got an `ignored` paraemters to exclude some jobs if they are temprorary failing. The purpose of this job is to be required for merges, achieving Green CI Policy.
145+
146+
_Recovery:_ Manually trigger the action on the desired branch.
140147

141148
## Maintenance
142149

.github/workflows/all-green.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Check Pull Request CI Status
2+
3+
on:
4+
pull_request:
5+
types:
6+
- opened
7+
- synchronize
8+
- reopened
9+
10+
concurrency:
11+
group: ${{ github.workflow }}-${{ github.ref }}
12+
cancel-in-progress: true
13+
14+
permissions:
15+
checks: read
16+
statuses: read
17+
18+
jobs:
19+
all-jobs-are-green:
20+
runs-on: ubuntu-latest
21+
steps:
22+
- name: Run Ensure CI Success
23+
uses: DataDog/ensure-ci-success@f40e6ffd8e60280d478b9b92209aaa30d3d56895
24+
with:
25+
initial-delay-seconds: "1000"
26+
max-retries: "60"
27+
ignored-name-patterns: |
28+
dd-gitlab/default-pipeline
29+
dd-gitlab/check_inst 4/4
30+
dd-gitlab/muzzle .*
31+
32+
# ignored jobs :
33+
#
34+
# * dd-gitlab/default-pipeline => success rate of 70% (needs an owner)
35+
# * dd-gitlab/check_inst 4/4 => success rate of 78% (needs an owner)
36+
# * dd-gitlab/muzzle .* => success rate of ~85% (needs an owner)

0 commit comments

Comments
 (0)