From bbfd0c7927c7d0dac7d4d4c9d8350cec8c9622f8 Mon Sep 17 00:00:00 2001 From: Charles de Beauchesne Date: Tue, 6 May 2025 11:54:28 +0200 Subject: [PATCH 1/4] Add a gatekeeper job for PR --- .github/workflows/all-green.yml | 34 +++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 .github/workflows/all-green.yml diff --git a/.github/workflows/all-green.yml b/.github/workflows/all-green.yml new file mode 100644 index 00000000000..83e12c35fd2 --- /dev/null +++ b/.github/workflows/all-green.yml @@ -0,0 +1,34 @@ +name: Check Pull Request CI Status + +on: + pull_request: + types: + - opened + - synchronize + - reopened + +permissions: + checks: read + statuses: read + +jobs: + all-jobs-are-green: + runs-on: ubuntu-latest + steps: + - name: Run Ensure CI Success + uses: DataDog/ensure-ci-success@f40e6ffd8e60280d478b9b92209aaa30d3d56895 + with: + initial-delay-seconds: "1000" + max-retries: "60" + ignored-name-patterns: | + ci/circleci: .* + dd-gitlab/default-pipeline + dd-gitlab/check_inst 4/4 + dd-gitlab/muzzle .* + +# ignored jobs : +# +# * ci/circleci: .* => will be decommisionned soon +# * dd-gitlab/default-pipeline => success rate of 70% (needs an owner) +# * dd-gitlab/check_inst 4/4 => success rate of 78% (needs an owner) +# * dd-gitlab/muzzle 3/8 => success rate of ~85% (needs an owner) From d5c12752b6517dfca54751407158d7a009dc9514 Mon Sep 17 00:00:00 2001 From: Charles de Beauchesne Date: Tue, 6 May 2025 16:30:57 +0200 Subject: [PATCH 2/4] Include circleCI --- .github/workflows/all-green.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/all-green.yml b/.github/workflows/all-green.yml index 83e12c35fd2..e8e622c1012 100644 --- a/.github/workflows/all-green.yml +++ b/.github/workflows/all-green.yml @@ -21,14 +21,12 @@ jobs: initial-delay-seconds: "1000" max-retries: "60" ignored-name-patterns: | - ci/circleci: .* dd-gitlab/default-pipeline dd-gitlab/check_inst 4/4 dd-gitlab/muzzle .* # ignored jobs : # -# * ci/circleci: .* => will be decommisionned soon # * dd-gitlab/default-pipeline => success rate of 70% (needs an owner) # * dd-gitlab/check_inst 4/4 => success rate of 78% (needs an owner) -# * dd-gitlab/muzzle 3/8 => success rate of ~85% (needs an owner) +# * dd-gitlab/muzzle .* => success rate of ~85% (needs an owner) From dcd3535997d2f4f283cc5f857275cef1788bacfb Mon Sep 17 00:00:00 2001 From: Charles de Beauchesne Date: Wed, 7 May 2025 09:18:57 +0200 Subject: [PATCH 3/4] Add concurrency --- .github/workflows/all-green.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/all-green.yml b/.github/workflows/all-green.yml index e8e622c1012..c9e12e18b06 100644 --- a/.github/workflows/all-green.yml +++ b/.github/workflows/all-green.yml @@ -7,6 +7,10 @@ on: - synchronize - reopened +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + permissions: checks: read statuses: read From b55b1f123a768d6e0a0364d3cab5d9c9cd2d2df6 Mon Sep 17 00:00:00 2001 From: Charles de Beauchesne Date: Wed, 7 May 2025 09:23:23 +0200 Subject: [PATCH 4/4] Add readme --- .github/workflows/README.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/README.md b/.github/workflows/README.md index 7273a1d8435..9dfa90f0eb6 100644 --- a/.github/workflows/README.md +++ b/.github/workflows/README.md @@ -137,6 +137,13 @@ _Action:_ Build the Java Client Library and runs [the system tests](https://gith _Recovery:_ Manually trigger the action on the desired branch. +### all-green [🔗](all-green.yaml) + +_Trigger:_ Any pull request. + +_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. + +_Recovery:_ Manually trigger the action on the desired branch. ## Maintenance