cloud_regression.yml 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  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. echo "netdata_repo=${NETDATA_CUSTOM_REPO}"
  38. echo "netdata_branch=${NETDATA_CUSTOM_BRANCH}"
  39. echo "netdata_pr_number=${NETDATA_CUSTOM_PR_NUMBER}"
  40. echo "netdata_commit_hash=${NETDATA_CUSTOM_COMMIT_HASH}"
  41. } >> "$GITHUB_OUTPUT"
  42. - name: Trigger Full Cloud Regression
  43. uses: aurelien-baudet/workflow-dispatch@v2
  44. with:
  45. repo: netdata/test-automation
  46. ref: refs/heads/master
  47. workflow: regression.yml
  48. token: ${{ secrets.NETDATABOT_GITHUB_TOKEN }}
  49. inputs: '{ "netdata_branch": "${{ steps.output-workflow-dispatch-params.outputs.netdata_branch }}",
  50. "netdata_repo": "${{ steps.output-workflow-dispatch-params.outputs.netdata_repo }}",
  51. "netdata_pr_number": "${{ steps.output-workflow-dispatch-params.outputs.netdata_pr_number }}",
  52. "netdata_branch_commit_hash": "${{ steps.output-workflow-dispatch-params.outputs.netdata_commit_hash }}",
  53. "custom_netdata_image": "true"
  54. }'
  55. wait-for-completion: false
  56. - name: Trigger Agent Parent/Child with Cloud Integration tests
  57. uses: aurelien-baudet/workflow-dispatch@v2
  58. with:
  59. repo: netdata/test-automation
  60. ref: refs/heads/master
  61. workflow: agent_smoke_tests.yml
  62. token: ${{ secrets.NETDATABOT_GITHUB_TOKEN }}
  63. inputs: '{ "netdata_branch": "${{ steps.output-workflow-dispatch-params.outputs.netdata_branch }}",
  64. "netdata_repo": "${{ steps.output-workflow-dispatch-params.outputs.netdata_repo }}",
  65. "netdata_pr_number": "${{ steps.output-workflow-dispatch-params.outputs.netdata_pr_number }}",
  66. "netdata_branch_commit_hash": "${{ steps.output-workflow-dispatch-params.outputs.netdata_commit_hash }}",
  67. "custom_netdata_image": "true"
  68. }'
  69. wait-for-completion: true