From cd3aef3184b7a08cc9d65c62bd77f23770fba80b Mon Sep 17 00:00:00 2001 From: Adel Bensaad Date: Wed, 27 Nov 2024 13:24:48 +0100 Subject: [PATCH 1/2] chore: remove ReportPortal configuration (#3151) The QA team has decided to remove Report Portal integration due to minimal adoption and lack of tangible benefits. Developers rely on CI for test failure analysis, and the Auto Triage feature was not utilized. Removing RP will simplify CI pipelines and eliminate unnecessary maintenance. --- .github/workflows/verify-pr.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/verify-pr.yml b/.github/workflows/verify-pr.yml index 35a1fde37..bf1637df2 100644 --- a/.github/workflows/verify-pr.yml +++ b/.github/workflows/verify-pr.yml @@ -90,6 +90,3 @@ jobs: username: ${{ secrets.CYPRESS_DHIS2_USERNAME }} password: ${{ secrets.CYPRESS_DHIS2_PASSWORD }} recordkey: ${{ secrets.CYPRESS_RECORD_KEY }} - reportportal_api_key: ${{ secrets.REPORTPORTAL_API_KEY }} - reportportal_endpoint: ${{ vars.REPORTPORTAL_ENDPOINT }} - reportportal_project: ${{ vars.REPORTPORTAL_PROJECT }} From ec57edd6b329b3c352697d1aeac5d289e927a7bb Mon Sep 17 00:00:00 2001 From: Jen Jones Arnesen Date: Wed, 4 Dec 2024 14:40:53 +0100 Subject: [PATCH 2/2] chore: release workflow improvements (#3157) There are 2 main improvements to the workflow to help solve all the failing builds: 1. Instead of complex if statements in the gh workflow file (they aren't even working anyway!), use commit_analyzer config to prevent release for our [skip release] and [skip ci] PRs. 2. Publishing to AppHub fails if there is no build file, which there won't be in the case of chores and [skip release]. So add an if statement that checks that a build was made. The output gets set to "yes" if there is a build. 3. The report-release-result job should always run. But it should only report a success message if there is a build and the release step was successful (which is not only the build file but also whether it was published to apphub) --- .github/workflows/release.yml | 36 +++++++++++++++++------------------ 1 file changed, 17 insertions(+), 19 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 1474d09fe..4c0b2603e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -19,18 +19,10 @@ jobs: runs-on: ubuntu-latest if: > ${{ !github.event.push.repository.fork && - github.actor != 'dependabot[bot]' && - !contains(github.event.head_commit.message, '[skip ci]') && - !contains(github.event.head_commit.message, '[skip release]') }} + github.actor != 'dependabot[bot]' }} + outputs: + build_exists: ${{ steps.check_build.outputs.build_exists }} steps: - - name: Print GitHub event context - run: echo "$GITHUB_EVENT" | jq '.' - env: - GITHUB_EVENT: ${{ toJson(github.event) }} - - - name: Print GitHub ref - run: echo "GITHUB_REF is $GITHUB_REF" and actor is ${{ github.actor }} - - uses: actions/checkout@v4 with: token: ${{ secrets.DHIS2_BOT_GITHUB_TOKEN }} @@ -47,33 +39,39 @@ jobs: run: npx semantic-release env: GITHUB_TOKEN: ${{ secrets.DHIS2_BOT_GITHUB_TOKEN }} - DEBUG: '@semantic-release/commit-analyzer' + + - name: Set build_exists output + id: check_build + run: | + if ls build/bundle/dashboard-*.zip 1> /dev/null 2>&1; then + echo "build_exists=yes" >> $GITHUB_OUTPUT + else + echo "build_exists=no" >> $GITHUB_OUTPUT + fi - name: Publish to AppHub + if: ${{ steps.check_build.outputs.build_exists == 'yes' }} run: yarn run d2-app-scripts publish report-release-result: runs-on: ubuntu-latest needs: release - if: > - ${{ !github.event.push.repository.fork && - github.actor != 'dependabot[bot]' && - !contains(github.event.head_commit.message, '[skip ci]') && - !contains(github.event.head_commit.message, '[skip release]') }} + if: ${{ always() }} steps: - name: Checkout code + if: ${{ needs.release.outputs.build_exists == 'yes' && success() }} uses: actions/checkout@v4 with: ref: master fetch-depth: 0 - name: Extract version - if: success() + if: ${{ needs.release.outputs.build_exists == 'yes' && success() }} id: extract_version uses: Saionaro/extract-package-version@v1.3.0 - name: Send success message to analytics-internal-bot slack channel - if: success() + if: ${{ needs.release.outputs.build_exists == 'yes' && success() }} id: slack_success uses: slackapi/slack-github-action@v1.27.0 with: