From 58daab21cd043e1dc37024a7f99b396788372918 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 9 Mar 2024 14:19:48 +0100 Subject: Merging upstream version 1.44.3. Signed-off-by: Daniel Baumann --- .github/workflows/build.yml | 39 +++++++++++++++++- .github/workflows/checks.yml | 2 +- .github/workflows/docker.yml | 2 +- .github/workflows/monitor-releases.yml | 72 ++++++++++++++++++++++++++++++++++ .github/workflows/packaging.yml | 2 +- .github/workflows/review.yml | 1 + 6 files changed, 114 insertions(+), 4 deletions(-) create mode 100644 .github/workflows/monitor-releases.yml (limited to '.github/workflows') diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 2aabbcf2d..4a6debc46 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -34,7 +34,7 @@ jobs: submodules: recursive - name: Check files id: check-files - uses: tj-actions/changed-files@v39 + uses: tj-actions/changed-files@v40 with: since_last_remote_commit: ${{ github.event_name != 'pull_request' }} files: | @@ -865,6 +865,37 @@ jobs: makeLatest: true tag: ${{ steps.version.outputs.version }} token: ${{ secrets.NETDATABOT_GITHUB_TOKEN }} + - name: Checkout netdata main Repo # Checkout back to netdata/netdata repo to the update latest packaged versions + id: checkout-netdata + uses: actions/checkout@v4 + with: + token: ${{ secrets.NETDATABOT_GITHUB_TOKEN }} + - name: Init python environment for publish release metadata + uses: actions/setup-python@v4 + id: init-python + with: + python-version: "3.12" + - name: Setup python environment + id: setup-python + run: | + pip install -r .github/scripts/modules/requirements.txt + - name: Check if the version is latest and published + id: check-latest-version + run: | + python .github/scripts/check_latest_versions.py ${{ steps.version.outputs.version }} + - name: SSH setup + id: ssh-setup + if: github.event_name == 'workflow_dispatch' && github.repository == 'netdata/netdata' && steps.check-latest-version.outputs.versions_needs_update == 'true' + uses: shimataro/ssh-key-action@v2 + with: + key: ${{ secrets.NETDATABOT_PACKAGES_SSH_KEY }} + name: id_ecdsa + known_hosts: ${{ secrets.PACKAGES_KNOWN_HOSTS }} + - name: Sync newer releases + id: sync-releases + if: github.event_name == 'workflow_dispatch' && github.repository == 'netdata/netdata' && steps.check-latest-version.outputs.versions_needs_update == 'true' + run: | + .github/scripts/upload-new-version-tags.sh - name: Failure Notification uses: rtCamp/action-slack-notify@v2 env: @@ -880,6 +911,12 @@ jobs: Fetch artifacts: ${{ steps.fetch.outcome }} Prepare version info: ${{ steps.version.outcome }} Create release: ${{ steps.create-release.outcome }} + Checkout back netdata/netdata: ${{ steps.checkout-netdata.outcome }} + Init python environment: ${{ steps.init-python.outcome }} + Setup python environment: ${{ steps.setup-python.outcome }} + Check the nearly published release against the advertised: ${{ steps.check-latest-version.outcome }} + Setup ssh: ${{ steps.ssh-setup.outcome }} + Sync with the releases: ${{ steps.sync-releases.outcome }} SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }} if: >- ${{ diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index e99704adb..1308f45fa 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -25,7 +25,7 @@ jobs: submodules: recursive - name: Check files id: check-files - uses: tj-actions/changed-files@v39 + uses: tj-actions/changed-files@v40 with: since_last_remote_commit: ${{ github.event_name != 'pull_request' }} files: | diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index c1dfc55eb..b7fe0a866 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -31,7 +31,7 @@ jobs: submodules: recursive - name: Check files id: file-check - uses: tj-actions/changed-files@v39 + uses: tj-actions/changed-files@v40 with: since_last_remote_commit: ${{ github.event_name != 'pull_request' }} files: | diff --git a/.github/workflows/monitor-releases.yml b/.github/workflows/monitor-releases.yml new file mode 100644 index 000000000..649cf68aa --- /dev/null +++ b/.github/workflows/monitor-releases.yml @@ -0,0 +1,72 @@ +--- +name: Monitor-releases + +on: + release: + types: [released, deleted] + workflow_dispatch: + inputs: + channel: + description: 'Specify the release channel' + required: true + default: 'stable' + + +concurrency: # This keeps multiple instances of the job from running concurrently for the same ref and event type. + group: monitor-{{ github.event.inputs.channel }}-releases-${{ github.ref }}-${{ github.event_name }} + cancel-in-progress: true + +jobs: + update-stable-agents-metadata: + name: update-stable-agents-metadata + runs-on: ubuntu-latest + steps: + - name: Checkout + id: checkout + uses: actions/checkout@v4 + with: + token: ${{ secrets.NETDATABOT_GITHUB_TOKEN }} + - name: Init python environment + uses: actions/setup-python@v4 + id: init-python + with: + python-version: "3.12" + - name: Setup python environment + id: setup-python + run: | + pip install -r .github/scripts/modules/requirements.txt + - name: Check for newer versions + id: check-newer-releases + run: | + python .github/scripts/check_latest_versions_per_channel.py "${{ github.event.inputs.channel }}" + - name: SSH setup + id: ssh-setup + if: github.event_name == 'workflow_dispatch' && github.repository == 'netdata/netdata' && steps.check-newer-releases.outputs.versions_needs_update == 'true' + uses: shimataro/ssh-key-action@v2 + with: + key: ${{ secrets.NETDATABOT_PACKAGES_SSH_KEY }} + name: id_ecdsa + known_hosts: ${{ secrets.PACKAGES_KNOWN_HOSTS }} + - name: Sync newer releases + id: sync-releases + if: github.event_name == 'workflow_dispatch' && github.repository == 'netdata/netdata' && steps.check-newer-releases.outputs.versions_needs_update == 'true' + run: | + .github/scripts/upload-new-version-tags.sh + - name: Failure Notification + uses: rtCamp/action-slack-notify@v2 + env: + SLACK_COLOR: 'danger' + SLACK_FOOTER: '' + SLACK_ICON_EMOJI: ':github-actions:' + SLACK_TITLE: 'Failed to prepare changelog:' + SLACK_USERNAME: 'GitHub Actions' + SLACK_MESSAGE: |- + ${{ github.repository }}: Failed to update stable Agent's metadata. + Checkout: ${{ steps.checkout.outcome }} + Init python: ${{ steps.init-python.outcome }} + Setup python: ${{ steps.setup-python.outcome }} + Check for newer stable releaes: ${{ steps.check-newer-releases.outcome }} + Setup ssh: ${{ steps.ssh-setup.outcome }} + Syncing newer release to packages.netdata.cloud : ${{ steps.sync-releases.outcome }} + SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }} + if: failure() diff --git a/.github/workflows/packaging.yml b/.github/workflows/packaging.yml index 9b15cf94b..eb936c4d9 100644 --- a/.github/workflows/packaging.yml +++ b/.github/workflows/packaging.yml @@ -41,7 +41,7 @@ jobs: submodules: recursive - name: Check files id: file-check - uses: tj-actions/changed-files@v39 + uses: tj-actions/changed-files@v40 with: since_last_remote_commit: ${{ github.event_name != 'pull_request' }} files: | diff --git a/.github/workflows/review.yml b/.github/workflows/review.yml index 732a4a5a1..8cb61f2cf 100644 --- a/.github/workflows/review.yml +++ b/.github/workflows/review.yml @@ -234,6 +234,7 @@ jobs: ./.git/* packaging/makeself/makeself.sh packaging/makeself/makeself-header.sh + ./fluent-bit/* yamllint: name: yamllint -- cgit v1.2.3