From d7e1b446c4d4b1d8a95021952bbb54f7e892917a Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sat, 25 Jan 2025 15:02:01 -0500 Subject: [PATCH] test [skip ci] --- .github/workflows/create_rc_pr.yml | 159 ++++++++++++++------------- tasks/libs/ciproviders/github_api.py | 1 + 2 files changed, 85 insertions(+), 75 deletions(-) diff --git a/.github/workflows/create_rc_pr.yml b/.github/workflows/create_rc_pr.yml index caba7218cb0d2a..04d428df7b2429 100644 --- a/.github/workflows/create_rc_pr.yml +++ b/.github/workflows/create_rc_pr.yml @@ -16,15 +16,19 @@ permissions: {} jobs: find_release_branches: runs-on: ubuntu-latest + permissions: + contents: write + pull-requests: write outputs: branches: ${{ steps.branches.outputs.value }} warning: ${{ steps.warning.outputs.value }} steps: - - name: Checkout repository - uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4 + - name: Checkout the main branch + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: - sparse-checkout: 'tasks' - persist-credentials: false + ref: sabrina/pin-intg-core + fetch-depth: 0 + persist-credentials: true - name: Install python uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0 @@ -39,82 +43,87 @@ jobs: pip install -r tasks/libs/requirements-github.txt pip install -r tasks/requirements_release_tasks.txt - - name: Check previous agent 6 RC status - if: ${{ env.IS_AGENT6_RELEASE == 'true' }} - env: - DD_SITE: 'datadoghq.com' - DD_API_KEY: ${{ secrets.DD_API_KEY }} - DD_APP_KEY: ${{ secrets.DD_APP_KEY }} - SLACK_DATADOG_AGENT_CI_WEBHOOK: ${{ secrets.SLACK_DATADOG_AGENT_CI_WEBHOOK }} + - name: test integrations Core run: | - inv -e release.check-previous-agent6-rc + git status + git tag --merged sabrina/pin-intg-core | grep -E '^7\.[0-9]+\.[0-9]+(-rc.*|-devel.*)?$' + inv -e release.pin-integrations-core + # - name: Check previous agent 6 RC status + # if: ${{ env.IS_AGENT6_RELEASE == 'true' }} + # env: + # DD_SITE: 'datadoghq.com' + # DD_API_KEY: ${{ secrets.DD_API_KEY }} + # DD_APP_KEY: ${{ secrets.DD_APP_KEY }} + # SLACK_DATADOG_AGENT_CI_WEBHOOK: ${{ secrets.SLACK_DATADOG_AGENT_CI_WEBHOOK }} + # run: | + # inv -e release.check-previous-agent6-rc - - name: Determine the release active branches - id: branches - run: | - if ${{ env.IS_AGENT6_RELEASE == 'true' }}; then - echo "value=[\"$AGENT6_RELEASE_BRANCH\"]" >> $GITHUB_OUTPUT - else - echo "value=$(inv release.get-unreleased-release-branches)" >> $GITHUB_OUTPUT - fi + # - name: Determine the release active branches + # id: branches + # run: | + # if ${{ env.IS_AGENT6_RELEASE == 'true' }}; then + # echo "value=[\"$AGENT6_RELEASE_BRANCH\"]" >> $GITHUB_OUTPUT + # else + # echo "value=$(inv release.get-unreleased-release-branches)" >> $GITHUB_OUTPUT + # fi - - name: Set the warning option - id: warning - if: github.event.schedule == '0 8 * * 1,3,5' - run: | - echo "value=-w" >> $GITHUB_OUTPUT + # - name: Set the warning option + # id: warning + # if: github.event.schedule == '0 8 * * 1,3,5' + # run: | + # echo "value=-w" >> $GITHUB_OUTPUT - create_rc_pr: - runs-on: ubuntu-latest - needs: find_release_branches - permissions: - contents: write - pull-requests: write - strategy: - matrix: - value: ${{fromJSON(needs.find_release_branches.outputs.branches)}} - fail-fast: false - steps: - - name: Checkout the main branch - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - with: - persist-credentials: true + # create_rc_pr: + # runs-on: ubuntu-latest + # needs: find_release_branches + # permissions: + # contents: write + # pull-requests: write + # strategy: + # matrix: + # value: ${{fromJSON(needs.find_release_branches.outputs.branches)}} + # fail-fast: false + # steps: + # - name: Checkout the main branch + # uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + # with: + # persist-credentials: true - - name: Install python - uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0 - with: - python-version-file: .python-version - cache: "pip" + # - name: Install python + # uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0 + # with: + # python-version-file: .python-version + # cache: "pip" - - name: Install Python dependencies - run: | - python -m pip install --upgrade pip - pip install -r requirements.txt - pip install -r tasks/libs/requirements-github.txt - pip install -r tasks/requirements_release_tasks.txt + # - name: Install Python dependencies + # run: | + # python -m pip install --upgrade pip + # pip install -r requirements.txt + # pip install -r tasks/libs/requirements-github.txt + # pip install -r tasks/requirements_release_tasks.txt - - name: Check for changes since last RC - id: check_for_changes - env: - ATLASSIAN_USERNAME: ${{ secrets.ATLASSIAN_USERNAME }} - ATLASSIAN_PASSWORD: ${{ secrets.ATLASSIAN_PASSWORD }} - SLACK_API_TOKEN : ${{ secrets.SLACK_DATADOG_AGENT_BOT_TOKEN }} - MATRIX: ${{ matrix.value }} - WARNING: ${{ needs.find_release_branches.outputs.warning }} - run: | - if [ -n "${{ needs.find_release_branches.outputs.warning }}" ]; then - echo "CHANGES=$(inv -e release.check-for-changes -r "$MATRIX" "$WARNING")" >> $GITHUB_OUTPUT - else - echo "CHANGES=$(inv -e release.check-for-changes -r "$MATRIX")" >> $GITHUB_OUTPUT - fi + # - name: Check for changes since last RC + # id: check_for_changes + # env: + # ATLASSIAN_USERNAME: ${{ secrets.ATLASSIAN_USERNAME }} + # ATLASSIAN_PASSWORD: ${{ secrets.ATLASSIAN_PASSWORD }} + # SLACK_API_TOKEN : ${{ secrets.SLACK_DATADOG_AGENT_BOT_TOKEN }} + # MATRIX: ${{ matrix.value }} + # WARNING: ${{ needs.find_release_branches.outputs.warning }} + # run: | + # if [ -n "${{ needs.find_release_branches.outputs.warning }}" ]; then + # echo "CHANGES=$(inv -e release.check-for-changes -r "$MATRIX" "$WARNING")" >> $GITHUB_OUTPUT + # else + # echo "CHANGES=$(inv -e release.check-for-changes -r "$MATRIX")" >> $GITHUB_OUTPUT + # fi - - name: Create RC PR - if: ${{ steps.check_for_changes.outputs.CHANGES == 'true' || env.IS_AGENT6_RELEASE == 'true' }} - env: - MATRIX: ${{ matrix.value }} - run: | - if ${{ env.IS_AGENT6_RELEASE == 'true' }}; then - inv -e release.create-rc -r "$MATRIX" --slack-webhook=${{ secrets.AGENT6_RELEASE_SLACK_WEBHOOK }} --patch-version - else - inv -e release.create-rc -r "$MATRIX" --slack-webhook=${{ secrets.AGENT_RELEASE_SYNC_SLACK_WEBHOOK }} - fi + # - name: Create RC PR + # if: ${{ steps.check_for_changes.outputs.CHANGES == 'true' || env.IS_AGENT6_RELEASE == 'true' }} + # env: + # MATRIX: ${{ matrix.value }} + # run: | + # if ${{ env.IS_AGENT6_RELEASE == 'true' }}; then + # inv -e release.create-rc -r "$MATRIX" --slack-webhook=${{ secrets.AGENT6_RELEASE_SLACK_WEBHOOK }} --patch-version + # else + # inv -e release.create-rc -r "$MATRIX" --slack-webhook=${{ secrets.AGENT_RELEASE_SYNC_SLACK_WEBHOOK }} + # fi diff --git a/tasks/libs/ciproviders/github_api.py b/tasks/libs/ciproviders/github_api.py index 8db46e8c7b19be..133354dadeaa6a 100644 --- a/tasks/libs/ciproviders/github_api.py +++ b/tasks/libs/ciproviders/github_api.py @@ -666,6 +666,7 @@ def create_release_pr(title, base_branch, target_branch, version, changelog_pr=F pr_body="", base_branch=base_branch, target_branch=target_branch, + draft=True ) if not pr: