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