From 881aa4d1c8f5d61644d1b552095bc530a3b6ef78 Mon Sep 17 00:00:00 2001 From: Ghislain Piot Date: Tue, 20 Aug 2024 17:25:26 +0200 Subject: [PATCH 1/6] New releasability --- .github/workflows/releasability.yml | 69 +++++++++-------------------- 1 file changed, 21 insertions(+), 48 deletions(-) diff --git a/.github/workflows/releasability.yml b/.github/workflows/releasability.yml index 67c58da96a..9657ee6572 100644 --- a/.github/workflows/releasability.yml +++ b/.github/workflows/releasability.yml @@ -7,51 +7,24 @@ name: Releasability status jobs: update_releasability_status: - runs-on: ubuntu-latest - name: Releasability status - permissions: - id-token: write - statuses: write - contents: read - if: >- - github.event_name == 'workflow_dispatch' || - ((contains(fromJSON('["main", "master"]'), - github.event.check_suite.head_branch) || - startsWith(github.event.check_suite.head_branch, 'dogfood-') || - startsWith(github.event.check_suite.head_branch, 'branch-')) && - github.event.check_suite.conclusion == 'success' && - github.event.check_suite.app.slug == 'cirrus-ci') - steps: - - uses: SonarSource/gh-action_releasability/releasability-status@v1.2.1 - env: - GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}' - continue-on-error: true - - - name: Check current status - id: check_status - uses: octokit/request-action@v2.x - with: - route: GET /repos/${{ github.repository }}/commits/${{ github.sha }}/status - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - - name: Extract status information - id: extract_info - run: | - status_info=$(echo '${{ steps.check_status.outputs.data }}' | jq -r '.statuses[] | select(.context == "Releasability") | {description: .description, target_url: .target_url}') - description=$(echo "$status_info" | jq -r '.description') - target_url=$(echo "$status_info" | jq -r '.target_url') - echo "::set-output name=description::$description" - echo "::set-output name=target_url::$target_url" - - - name: Update status to success - if: fromJson(steps.check_status.outputs.data).state != 'success' - uses: octokit/request-action@v2.x - with: - route: POST /repos/${{ github.repository }}/statuses/${{ github.sha }} - state: "success" - target_url: "${{ steps.extract_info.outputs.target_url }}" - description: "${{ steps.extract_info.outputs.description }} (status rewritten)" - context: "Releasability" - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + runs-on: ubuntu-latest + name: Releasability status + permissions: + id-token: write + statuses: write + contents: read + if: >- + github.event_name == 'workflow_dispatch' || + ((contains(fromJSON('["main", "master"]'), + github.event.check_suite.head_branch) || + startsWith(github.event.check_suite.head_branch, 'dogfood-') || + startsWith(github.event.check_suite.head_branch, 'branch-')) && + github.event.check_suite.conclusion == 'success' && + github.event.check_suite.app.slug == 'cirrus-ci') + steps: + - uses: >- + SonarSource/gh-action_releasability/releasability-status@v2 + with: + optional_checks: "Jira" + env: + GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}' \ No newline at end of file From 61fbb6909668e9e8a213fb1ccadccd36046c5506 Mon Sep 17 00:00:00 2001 From: Ghislain Piot Date: Tue, 20 Aug 2024 17:28:07 +0200 Subject: [PATCH 2/6] fix indent --- .github/workflows/releasability.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/releasability.yml b/.github/workflows/releasability.yml index 9657ee6572..a35e84393f 100644 --- a/.github/workflows/releasability.yml +++ b/.github/workflows/releasability.yml @@ -21,10 +21,10 @@ jobs: startsWith(github.event.check_suite.head_branch, 'branch-')) && github.event.check_suite.conclusion == 'success' && github.event.check_suite.app.slug == 'cirrus-ci') - steps: - - uses: >- - SonarSource/gh-action_releasability/releasability-status@v2 - with: - optional_checks: "Jira" - env: - GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}' \ No newline at end of file + steps: + - uses: >- + SonarSource/gh-action_releasability/releasability-status@v2 + with: + optional_checks: "Jira" + env: + GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}' \ No newline at end of file From afd0ee67171cdcf028bab506797a75194ac27d80 Mon Sep 17 00:00:00 2001 From: Ghislain Piot Date: Wed, 21 Aug 2024 10:58:49 +0200 Subject: [PATCH 3/6] another try --- .github/workflows/releasability.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/releasability.yml b/.github/workflows/releasability.yml index a35e84393f..2730f5e340 100644 --- a/.github/workflows/releasability.yml +++ b/.github/workflows/releasability.yml @@ -22,9 +22,9 @@ jobs: github.event.check_suite.conclusion == 'success' && github.event.check_suite.app.slug == 'cirrus-ci') steps: - - uses: >- - SonarSource/gh-action_releasability/releasability-status@v2 - with: - optional_checks: "Jira" - env: - GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}' \ No newline at end of file + - uses: >- + SonarSource/gh-action_releasability/releasability-status@v2 + with: + optional_checks: "Jira" + env: + GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}' \ No newline at end of file From 68a4a5548d6e4d97f68e30fecad60c8b308494fc Mon Sep 17 00:00:00 2001 From: Ghislain Piot Date: Wed, 21 Aug 2024 11:42:07 +0200 Subject: [PATCH 4/6] to revert --- .github/workflows/releasability.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/releasability.yml b/.github/workflows/releasability.yml index 2730f5e340..4e2bdfc660 100644 --- a/.github/workflows/releasability.yml +++ b/.github/workflows/releasability.yml @@ -25,6 +25,6 @@ jobs: - uses: >- SonarSource/gh-action_releasability/releasability-status@v2 with: - optional_checks: "Jira" + optional_checks: "Jira,QA,Whitesource" env: GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}' \ No newline at end of file From b662b8d5420371c389c3766f00a4ae93ed56f288 Mon Sep 17 00:00:00 2001 From: Ghislain Piot Date: Thu, 22 Aug 2024 10:56:42 +0200 Subject: [PATCH 5/6] Update releasability.yml --- .github/workflows/releasability.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/releasability.yml b/.github/workflows/releasability.yml index 4e2bdfc660..4e330eeac8 100644 --- a/.github/workflows/releasability.yml +++ b/.github/workflows/releasability.yml @@ -25,6 +25,6 @@ jobs: - uses: >- SonarSource/gh-action_releasability/releasability-status@v2 with: - optional_checks: "Jira,QA,Whitesource" + optional_checks: "QA,WhiteSource,Jira" env: - GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}' \ No newline at end of file + GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}' From 3fde3c2e31b72ff6976d0c15ca9309a0ab400b45 Mon Sep 17 00:00:00 2001 From: Ghislain Piot Date: Thu, 22 Aug 2024 11:23:52 +0200 Subject: [PATCH 6/6] Update releasability.yml --- .github/workflows/releasability.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/releasability.yml b/.github/workflows/releasability.yml index 4e330eeac8..3717288e8f 100644 --- a/.github/workflows/releasability.yml +++ b/.github/workflows/releasability.yml @@ -25,6 +25,6 @@ jobs: - uses: >- SonarSource/gh-action_releasability/releasability-status@v2 with: - optional_checks: "QA,WhiteSource,Jira" + optional_checks: "Jira" env: GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}'