diff options
Diffstat (limited to '.github/workflows')
-rw-r--r-- | .github/workflows/build.yml | 313 | ||||
-rw-r--r-- | .github/workflows/checks.yml | 4 | ||||
-rw-r--r-- | .github/workflows/dashboard-pr.yml | 2 | ||||
-rw-r--r-- | .github/workflows/docker.yml | 12 | ||||
-rw-r--r-- | .github/workflows/generate-integrations.yml | 2 | ||||
-rw-r--r-- | .github/workflows/go-tests.yml | 2 | ||||
-rw-r--r-- | .github/workflows/packaging.yml | 2 |
7 files changed, 144 insertions, 193 deletions
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3a253c0cc..6add58697 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -35,7 +35,7 @@ jobs: submodules: recursive - name: Check source files id: check-source-files - uses: tj-actions/changed-files@v44 + uses: tj-actions/changed-files@v45 with: since_last_remote_commit: ${{ github.event_name != 'pull_request' }} files: | @@ -54,7 +54,7 @@ jobs: **/*.md - name: Check build files id: check-build-files - uses: tj-actions/changed-files@v44 + uses: tj-actions/changed-files@v45 with: since_last_remote_commit: ${{ github.event_name != 'pull_request' }} files: | @@ -275,12 +275,119 @@ jobs: && needs.file-check.outputs.run == 'true' }} + windows-build: # Test building on Windows + name: Test building on Windows + runs-on: windows-latest + needs: + - file-check + steps: + - name: Skip Check + id: skip + if: needs.file-check.outputs.run != 'true' + run: Write-Output "SKIPPED" + - name: Checkout + uses: actions/checkout@v4 + id: checkout + if: needs.file-check.outputs.run == 'true' + with: + submodules: recursive + lfs: true + - name: Set Up Go + id: golang + if: needs.file-check.outputs.run == 'true' + uses: actions/setup-go@v5 + with: + go-version: "^1.23" + - name: Set Up Dependencies + id: deps + if: needs.file-check.outputs.run == 'true' + run: ./packaging/windows/install-dependencies.ps1 + - name: Build Netdata + id: build + if: needs.file-check.outputs.run == 'true' + env: + BUILD_DIR: ${{ github.workspace }}\build + run: ./packaging/windows/build.ps1 + - name: Sign Agent Code + id: sign-agent + if: needs.file-check.outputs.run == 'true' && github.event_name != 'pull_request' + uses: azure/trusted-signing-action@v0.5.0 + with: + azure-tenant-id: ${{ secrets.CODE_SIGNING_TENNANT_ID }} + azure-client-id: ${{ secrets.CODE_SIGNING_CLIENT_ID }} + azure-client-secret: ${{ secrets.CODE_SIGNING_CLIENT_SECRET }} + endpoint: "https://eus.codesigning.azure.net/" + trusted-signing-account-name: Netdata + certificate-profile-name: Netdata + files-folder: ${{ github.workspace }}\build + files-folder-filter: exe,dll + files-folder-recurse: true + file-digest: SHA256 + timestamp-rfc3161: "http://timestamp.acs.microsoft.com" + timestamp-digest: SHA256 + - name: Package Netdata + id: package + if: needs.file-check.outputs.run == 'true' + env: + BUILD_DIR: ${{ github.workspace }}\build + run: ./packaging/windows/package.ps1 + - name: Sign Installer + id: sign-installer + if: needs.file-check.outputs.run == 'true' && github.event_name != 'pull_request' + uses: azure/trusted-signing-action@v0.5.0 + with: + azure-tenant-id: ${{ secrets.CODE_SIGNING_TENNANT_ID }} + azure-client-id: ${{ secrets.CODE_SIGNING_CLIENT_ID }} + azure-client-secret: ${{ secrets.CODE_SIGNING_CLIENT_SECRET }} + endpoint: "https://eus.codesigning.azure.net/" + trusted-signing-account-name: Netdata + certificate-profile-name: Netdata + files-folder: ${{ github.workspace }}\packaging\windows + files-folder-filter: msi + file-digest: SHA256 + timestamp-rfc3161: "http://timestamp.acs.microsoft.com" + timestamp-digest: SHA256 + - name: Upload Installer + id: upload + uses: actions/upload-artifact@v4.4.2 + with: + name: windows-x86_64-installer + path: packaging\windows\netdata*.msi + retention-days: 30 + - name: Failure Notification + uses: rtCamp/action-slack-notify@v2 + env: + SLACK_COLOR: 'danger' + SLACK_FOOTER: '' + SLACK_ICON_EMOJI: ':github-actions:' + SLACK_TITLE: 'Windows build failed:' + SLACK_USERNAME: 'GitHub Actions' + SLACK_MESSAGE: |- + ${{ github.repository }}: Updater checks for ${{ matrix.distro }} failed. + Checkout: ${{ steps.checkout.outcome }} + Set Up Dependencies: ${{ steps.deps.outcome }} + Build Netdata: ${{ steps.build.outcome }} + Sign Agent Code: ${{ steps.sign-agent.outcome }} + Package Netdata: ${{ steps.package.outcome }} + Sign Installer: ${{ steps.sign-installer.outcome }} + Upload Installer: ${{ steps.upload.outcome }} + SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }} + if: >- + ${{ + failure() + && startsWith(github.ref, 'refs/heads/master') + && github.event_name != 'pull_request' + && github.repository == 'netdata/netdata' + && needs.file-check.outputs.run == 'true' + }} + prepare-upload: # Consolidate the artifacts for uploading or releasing. name: Prepare Artifacts runs-on: ubuntu-latest needs: - build-dist - build-static + - windows-build - file-check steps: - name: Skip Check @@ -307,6 +414,18 @@ jobs: merge-multiple: true attempt_limit: 3 attempt_delay: 2000 + - name: Retrieve Windows Artifacts + id: fetch-windows + if: needs.file-check.outputs.run == 'true' + uses: Wandalen/wretry.action@v3 + with: + action: actions/download-artifact@v4 + with: | + pattern: windows-*-installer + path: dist-artifacts + merge-multiple: true + attempt_limit: 3 + attempt_delay: 2000 - name: Prepare Artifacts id: consolidate if: needs.file-check.outputs.run == 'true' @@ -338,7 +457,8 @@ jobs: ${{ github.repository }}: Failed to prepare release artifacts for upload. Checkout: ${{ steps.checkout.outcome }} Prepare environment: ${{ steps.prepare.outcome }} - Fetch dist tarball: ${{ steps.fetch-dist.outcome }} + Fetch dist artifacts: ${{ steps.fetch-dist.outcome }} + Fetch Windows installers: ${{ steps.fetch-windows.outcome }} Consolidate artifacts: ${{ steps.consolidate.outcome }} Store: ${{ steps.store.outcome }} SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }} @@ -489,68 +609,12 @@ jobs: && needs.file-check.outputs.run == 'true' }} - upload-nightly: # Upload the nightly build artifacts to GCS. - name: Upload Nightly Artifacts - runs-on: ubuntu-latest - if: github.event_name == 'workflow_dispatch' && github.event.inputs.type == 'nightly' && github.repository == 'netdata/netdata' - needs: - - artifact-verification-dist - - artifact-verification-static - steps: - - name: Retrieve Artifacts - id: fetch - uses: Wandalen/wretry.action@v3 - with: - action: actions/download-artifact@v4 - with: | - name: final-artifacts - path: final-artifacts - attempt_limit: 3 - attempt_delay: 2000 - - name: Authenticate to GCS - id: gcs-auth - uses: google-github-actions/auth@v2 - with: - project_id: ${{ secrets.GCP_NIGHTLY_STORAGE_PROJECT }} - credentials_json: ${{ secrets.GCS_STORAGE_SERVICE_KEY_JSON }} - - name: Setup GCS - id: gcs-setup - uses: google-github-actions/setup-gcloud@v2.1.1 - - name: Upload Artifacts - id: upload - uses: google-github-actions/upload-cloud-storage@v2.1.2 - with: - destination: ${{ secrets.GCP_NIGHTLY_STORAGE_BUCKET }} - gzip: false - path: ./final-artifacts/latest-version.txt - parent: false - - name: Failure Notification - uses: rtCamp/action-slack-notify@v2 - env: - SLACK_COLOR: 'danger' - SLACK_FOOTER: '' - SLACK_ICON_EMOJI: ':github-actions:' - SLACK_TITLE: 'Failed to upload nightly release artifacts:' - SLACK_USERNAME: 'GitHub Actions' - SLACK_MESSAGE: |- - ${{ github.repository }}: Failed to upload nightly release artifacts. - Fetch artifacts: ${{ steps.fetch.outcome }} - Authenticatie GCS: ${{ steps.gcs-auth.outcome }} - Setup GCS: ${{ steps.gcs-setup.outcome }} - Upload artifacts: ${{ steps.upload.outcome }} - SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }} - if: >- - ${{ - failure() - && startsWith(github.ref, 'refs/heads/master') - && github.event_name != 'pull_request' - }} - create-nightly: # Create a nightly build release in netdata/netdata-nightlies name: Create Nightly Release runs-on: ubuntu-latest if: github.event_name == 'workflow_dispatch' && github.event.inputs.type == 'nightly' && github.repository == 'netdata/netdata' needs: + - prepare-upload - artifact-verification-dist - artifact-verification-static steps: @@ -589,7 +653,7 @@ jobs: with: allowUpdates: false artifactErrorsFailBuild: true - artifacts: 'final-artifacts/sha256sums.txt,final-artifacts/netdata-*.tar.gz,final-artifacts/netdata-*.gz.run,final-artifacts/integrations.js' + artifacts: 'final-artifacts/sha256sums.txt,final-artifacts/netdata-*.tar.gz,final-artifacts/netdata-*.gz.run,final-artifacts/netdata-*.msi,final-artifacts/integrations.js' owner: netdata repo: netdata-nightlies body: Netdata nightly build for ${{ steps.version.outputs.date }}. @@ -707,7 +771,7 @@ jobs: with: allowUpdates: false artifactErrorsFailBuild: true - artifacts: 'final-artifacts/sha256sums.txt,final-artifacts/netdata-*.tar.gz,final-artifacts/netdata-*.gz.run,final-artifacts/integrations.js' + artifacts: 'final-artifacts/sha256sums.txt,final-artifacts/netdata-*.tar.gz,final-artifacts/netdata-*.gz.run,final-artifacts/netdata-*.msi,final-artifacts/integrations.js' draft: true tag: ${{ needs.normalize-tag.outputs.tag }} token: ${{ secrets.NETDATABOT_GITHUB_TOKEN }} @@ -930,24 +994,18 @@ jobs: id: load if: needs.file-check.outputs.run == 'true' run: docker load --input image.tar - - name: netdata-installer on ${{ matrix.distro }}, disable cloud - id: build-no-cloud - if: needs.file-check.outputs.run == 'true' - run: | - docker run --security-opt seccomp=unconfined -w /netdata test:${{ matrix.artifact_key }} \ - /bin/sh -c './netdata-installer.sh --dont-wait --dont-start-it --disable-cloud --one-time-build ${{ needs.file-check.outputs.skip-go }}' - name: netdata-installer on ${{ matrix.distro }}, require cloud id: build-cloud if: needs.file-check.outputs.run == 'true' run: | docker run --security-opt seccomp=unconfined -w /netdata test:${{ matrix.artifact_key }} \ - /bin/sh -c './netdata-installer.sh --dont-wait --dont-start-it --require-cloud --one-time-build ${{ needs.file-check.outputs.skip-go }}' + /bin/sh -c './netdata-installer.sh --dont-wait --dont-start-it --one-time-build ${{ needs.file-check.outputs.skip-go }}' - name: netdata-installer on ${{ matrix.distro }}, require cloud, no JSON-C id: build-no-jsonc if: matrix.jsonc_removal != '' && needs.file-check.outputs.run == 'true' run: | docker run --security-opt seccomp=unconfined -w /netdata test:${{ matrix.artifact_key }} \ - /bin/sh -c '/rmjsonc.sh && ./netdata-installer.sh --dont-wait --dont-start-it --require-cloud --one-time-build ${{ needs.file-check.outputs.skip-go }}' + /bin/sh -c '/rmjsonc.sh && ./netdata-installer.sh --dont-wait --dont-start-it --one-time-build ${{ needs.file-check.outputs.skip-go }}' - name: Failure Notification uses: rtCamp/action-slack-notify@v2 env: @@ -961,8 +1019,7 @@ jobs: Checkout: ${{ steps.checkout.outcome }} Fetch test environment: ${{ steps.fetch.outcome }} Load test environment: ${{ steps.load.outcome }} - netdata-installer, disable cloud: ${{ steps.build-no-cloud.outcome }} - netdata-installer, require cloud: ${{ steps.build-cloud.outcome }} + netdata-installer: ${{ steps.build-cloud.outcome }} netdata-installer, no JSON-C: ${{ steps.build-no-jsonc.outcome }} SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }} if: >- @@ -985,12 +1042,12 @@ jobs: max-parallel: 8 matrix: include: - - name: macos-12 - runner: macos-12 - name: macos-13 runner: macos-13 - name: macos-14-M1 runner: macos-14 + - name: macos-15-M1 + runner: macos-15 steps: - name: Skip Check id: skip @@ -1015,7 +1072,7 @@ jobs: id: build-source if: needs.file-check.outputs.run == 'true' run: | - sudo bash ./netdata-installer.sh --install-no-prefix /usr/local/netdata --dont-wait --dont-start-it --require-cloud --one-time-build + sudo bash ./netdata-installer.sh --install-no-prefix /usr/local/netdata --dont-wait --dont-start-it --one-time-build - name: Test Agent start up id: test-agent if: needs.file-check.outputs.run == 'true' @@ -1046,112 +1103,6 @@ jobs: && github.repository == 'netdata/netdata' }} - windows-build: # Test building on Windows - name: Test building on Windows - runs-on: windows-latest - if: github.event_name != 'workflow_dispatch' - needs: - - file-check - steps: - - name: Skip Check - id: skip - if: needs.file-check.outputs.run != 'true' - run: Write-Output "SKIPPED" - - name: Checkout - uses: actions/checkout@v4 - id: checkout - if: needs.file-check.outputs.run == 'true' - with: - submodules: recursive - lfs: true - - name: Set Up Go - id: golang - if: needs.file-check.outputs.run == 'true' - uses: actions/setup-go@v5 - with: - go-version: "^1.22" - - name: Set Up Dependencies - id: deps - if: needs.file-check.outputs.run == 'true' - run: ./packaging/windows/install-dependencies.ps1 - - name: Build Netdata - id: build - if: needs.file-check.outputs.run == 'true' - env: - BUILD_DIR: ${{ github.workspace }}\build - run: ./packaging/windows/build.ps1 - - name: Sign Agent Code - id: sign-agent - if: needs.file-check.outputs.run == 'true' && github.event_name != 'pull_request' - uses: azure/trusted-signing-action@v0.4.0 - with: - azure-tenant-id: ${{ secrets.CODE_SIGNING_TENNANT_ID }} - azure-client-id: ${{ secrets.CODE_SIGNING_CLIENT_ID }} - azure-client-secret: ${{ secrets.CODE_SIGNING_CLIENT_SECRET }} - endpoint: "https://eus.codesigning.azure.net/" - trusted-signing-account-name: Netdata - certificate-profile-name: Netdata - files-folder: ${{ github.workspace }}\build - files-folder-filter: exe,dll - files-folder-recurse: true - file-digest: SHA256 - timestamp-rfc3161: "http://timestamp.acs.microsoft.com" - timestamp-digest: SHA256 - - name: Package Netdata - id: package - if: needs.file-check.outputs.run == 'true' - env: - BUILD_DIR: ${{ github.workspace }}\build - run: ./packaging/windows/package.ps1 - - name: Sign Installer - id: sign-installer - if: needs.file-check.outputs.run == 'true' && github.event_name != 'pull_request' - uses: azure/trusted-signing-action@v0.4.0 - with: - azure-tenant-id: ${{ secrets.CODE_SIGNING_TENNANT_ID }} - azure-client-id: ${{ secrets.CODE_SIGNING_CLIENT_ID }} - azure-client-secret: ${{ secrets.CODE_SIGNING_CLIENT_SECRET }} - endpoint: "https://eus.codesigning.azure.net/" - trusted-signing-account-name: Netdata - certificate-profile-name: Netdata - files: ${{ github.workspace }}\packaging\windows\netdata-installer.exe - file-digest: SHA256 - timestamp-rfc3161: "http://timestamp.acs.microsoft.com" - timestamp-digest: SHA256 - - name: Upload Installer - id: upload - uses: actions/upload-artifact@v4.4.2 - with: - name: windows-x86_64-installer - path: packaging\windows\netdata-installer.exe - retention-days: 30 - - name: Failure Notification - uses: rtCamp/action-slack-notify@v2 - env: - SLACK_COLOR: 'danger' - SLACK_FOOTER: '' - SLACK_ICON_EMOJI: ':github-actions:' - SLACK_TITLE: 'Windows build failed:' - SLACK_USERNAME: 'GitHub Actions' - SLACK_MESSAGE: |- - ${{ github.repository }}: Updater checks for ${{ matrix.distro }} failed. - Checkout: ${{ steps.checkout.outcome }} - Set Up Dependencies: ${{ steps.deps.outcome }} - Build Netdata: ${{ steps.build.outcome }} - Sign Agent Code: ${{ steps.sign-agent.outcome }} - Package Netdata: ${{ steps.package.outcome }} - Sign Installer: ${{ steps.sign-installer.outcome }} - Upload Installer: ${{ steps.upload.outcome }} - SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }} - if: >- - ${{ - failure() - && startsWith(github.ref, 'refs/heads/master') - && github.event_name != 'pull_request' - && github.repository == 'netdata/netdata' - && needs.file-check.outputs.run == 'true' - }} - updater-check: # Test the generated dist archive using the updater code. name: Test Generated Distfile and Updater Code runs-on: ubuntu-latest diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index b33aa6ff1..82567a54e 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -25,7 +25,7 @@ jobs: submodules: recursive - name: Check source files id: check-source-files - uses: tj-actions/changed-files@v44 + uses: tj-actions/changed-files@v45 with: since_last_remote_commit: ${{ github.event_name != 'pull_request' }} files: | @@ -44,7 +44,7 @@ jobs: **/*.md - name: Check build files id: check-build-files - uses: tj-actions/changed-files@v44 + uses: tj-actions/changed-files@v45 with: since_last_remote_commit: ${{ github.event_name != 'pull_request' }} files: | diff --git a/.github/workflows/dashboard-pr.yml b/.github/workflows/dashboard-pr.yml index 418a8b8e6..b72c0fc6c 100644 --- a/.github/workflows/dashboard-pr.yml +++ b/.github/workflows/dashboard-pr.yml @@ -28,7 +28,7 @@ jobs: src/web/gui/bundle_dashboard_v1.py ${{ github.event.inputs.dashboard_version }} - name: Create Pull Request id: pr - uses: peter-evans/create-pull-request@v6 + uses: peter-evans/create-pull-request@v7 with: title: 'Update dashboard to version ${{ github.event.inputs.dashboard_version }}.' body: 'See https://github.com/netdata/dashboard/releases/tag/${{ github.event.inputs.dashboard_version }} for changes.' diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index b1448a0de..d98903073 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -43,7 +43,7 @@ jobs: - name: Check source files id: check-source-files if: github.event_name != 'workflow_dispatch' - uses: tj-actions/changed-files@v44 + uses: tj-actions/changed-files@v45 with: since_last_remote_commit: ${{ github.event_name != 'pull_request' }} files: | @@ -63,7 +63,7 @@ jobs: - name: Check build system files id: check-build-files if: github.event_name != 'workflow_dispatch' - uses: tj-actions/changed-files@v44 + uses: tj-actions/changed-files@v45 with: since_last_remote_commit: ${{ github.event_name != 'pull_request' }} files: | @@ -178,7 +178,7 @@ jobs: - name: Upload Cache id: upload-cache if: github.repository == 'netdata/netdata' && needs.file-check.outputs.run == 'true' && github.event_name == 'workflow_dispatch' - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v4.4.2 with: name: cache-${{ steps.artifact-name.outputs.platform }} path: /tmp/build-cache/* @@ -296,7 +296,7 @@ jobs: - name: Upload digest id: upload-digest if: github.repository == 'netdata/netdata' - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v4.4.2 with: name: docker-digests-${{ steps.artifact-name.outputs.platform }} path: /tmp/digests/* @@ -451,7 +451,7 @@ jobs: - name: Upload digest id: upload-digest if: github.repository == 'netdata/netdata' - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v4.4.2 with: name: quay-digests-${{ steps.artifact-name.outputs.platform }} path: /tmp/digests/* @@ -607,7 +607,7 @@ jobs: - name: Upload digest id: upload-digest if: github.repository == 'netdata/netdata' - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v4.4.2 with: name: ghcr-digests-${{ steps.artifact-name.outputs.platform }} path: /tmp/digests/* diff --git a/.github/workflows/generate-integrations.yml b/.github/workflows/generate-integrations.yml index f6e930899..4acca5887 100644 --- a/.github/workflows/generate-integrations.yml +++ b/.github/workflows/generate-integrations.yml @@ -57,7 +57,7 @@ jobs: run: rm -rf go.d.plugin virtualenv - name: Create PR id: create-pr - uses: peter-evans/create-pull-request@v6 + uses: peter-evans/create-pull-request@v7 with: token: ${{ secrets.NETDATABOT_GITHUB_TOKEN }} commit-message: Regenerate integrations.js diff --git a/.github/workflows/go-tests.yml b/.github/workflows/go-tests.yml index 93596454b..7e94dc012 100644 --- a/.github/workflows/go-tests.yml +++ b/.github/workflows/go-tests.yml @@ -24,7 +24,7 @@ jobs: submodules: recursive - name: Check files id: check-files - uses: tj-actions/changed-files@v44 + uses: tj-actions/changed-files@v45 with: since_last_remote_commit: ${{ github.event_name != 'pull_request' }} files: | diff --git a/.github/workflows/packaging.yml b/.github/workflows/packaging.yml index 7cf472707..3bcde17f6 100644 --- a/.github/workflows/packaging.yml +++ b/.github/workflows/packaging.yml @@ -41,7 +41,7 @@ jobs: submodules: recursive - name: Check files id: check-files - uses: tj-actions/changed-files@v44 + uses: tj-actions/changed-files@v45 with: since_last_remote_commit: ${{ github.event_name != 'pull_request' }} files: | |