| 1 | name: Trigger Cloud Regression E2E Tests |
| 2 | on: |
| 3 | push: |
| 4 | branches: [master] |
| 5 | paths: |
| 6 | - 'CMakeLists.txt' |
| 7 | - '**.c' |
| 8 | - '**.cc' |
| 9 | - '**.cpp' |
| 10 | - '**.h' |
| 11 | - 'mqtt_websockets/**' |
| 12 | - 'aclk/aclk-schemas/**' |
| 13 | jobs: |
| 14 | trigger_cloud_regression_tests: |
| 15 | runs-on: ubuntu-latest |
| 16 | if: github.repository == 'netdata/netdata' |
| 17 | steps: |
| 18 | - name: Evaluate workflow dispatch parameters |
| 19 | env: |
| 20 | PR_REPO_NAME: ${{ github.event.pull_request.head.repo.full_name }} |
| 21 | PR_BRANCH_NAME: ${{ github.event.pull_request.head.ref }} |
| 22 | PR_COMMIT_HASH: ${{ github.event.pull_request.head.sha }} |
| 23 | id: output-workflow-dispatch-params |
| 24 | run: | |
| 25 | if [ "${{ github.event_name }}" == 'pull_request_target' ]; then |
| 26 | NETDATA_CUSTOM_REPO="$PR_REPO_NAME" |
| 27 | NETDATA_CUSTOM_BRANCH="$PR_BRANCH_NAME" |
| 28 | NETDATA_CUSTOM_PR_NUMBER="${{ github.event.number }}" |
| 29 | NETDATA_CUSTOM_COMMIT_HASH="$PR_COMMIT_HASH" |
| 30 | elif [ "${{ github.event_name }}" == 'push' ]; then |
| 31 | NETDATA_CUSTOM_REPO="netdata/netdata" |
| 32 | NETDATA_CUSTOM_BRANCH="master" |
| 33 | NETDATA_CUSTOM_PR_NUMBER="" |
| 34 | NETDATA_CUSTOM_COMMIT_HASH="${{ github.sha }}" |
| 35 | fi |
| 36 | |
| 37 | { |
| 38 | echo "netdata_repo=${NETDATA_CUSTOM_REPO}" |
| 39 | echo "netdata_branch=${NETDATA_CUSTOM_BRANCH}" |
| 40 | echo "netdata_pr_number=${NETDATA_CUSTOM_PR_NUMBER}" |
| 41 | echo "netdata_commit_hash=${NETDATA_CUSTOM_COMMIT_HASH}" |
| 42 | } >> "$GITHUB_OUTPUT" |
| 43 | |
| 44 | - name: Trigger Full Cloud Regression |
| 45 | uses: aurelien-baudet/workflow-dispatch@v2 |
| 46 | with: |
| 47 | repo: netdata/test-automation |
| 48 | ref: refs/heads/master |
| 49 | workflow: regression.yml |
| 50 | token: ${{ secrets.NETDATABOT_GITHUB_TOKEN }} |
| 51 | inputs: '{ "netdata_branch": "${{ steps.output-workflow-dispatch-params.outputs.netdata_branch }}", |
| 52 | "netdata_repo": "${{ steps.output-workflow-dispatch-params.outputs.netdata_repo }}", |
| 53 | "netdata_pr_number": "${{ steps.output-workflow-dispatch-params.outputs.netdata_pr_number }}", |
| 54 | "netdata_branch_commit_hash": "${{ steps.output-workflow-dispatch-params.outputs.netdata_commit_hash }}", |
| 55 | "custom_netdata_image": "true" |
| 56 | }' |
| 57 | wait-for-completion: false |
| 58 | |
| 59 | - name: Trigger Agent Parent/Child with Cloud Integration tests |
| 60 | uses: aurelien-baudet/workflow-dispatch@v2 |
| 61 | with: |
| 62 | repo: netdata/test-automation |
| 63 | ref: refs/heads/master |
| 64 | workflow: agent_smoke_tests.yml |
| 65 | token: ${{ secrets.NETDATABOT_GITHUB_TOKEN }} |
| 66 | inputs: '{ "netdata_branch": "${{ steps.output-workflow-dispatch-params.outputs.netdata_branch }}", |
| 67 | "netdata_repo": "${{ steps.output-workflow-dispatch-params.outputs.netdata_repo }}", |
| 68 | "netdata_pr_number": "${{ steps.output-workflow-dispatch-params.outputs.netdata_pr_number }}", |
| 69 | "netdata_branch_commit_hash": "${{ steps.output-workflow-dispatch-params.outputs.netdata_commit_hash }}", |
| 70 | "custom_netdata_image": "true" |
| 71 | }' |
| 72 | wait-for-completion: true |