mirror of
https://github.com/Telecominfraproject/wlan-cloud-services.git
synced 2025-12-26 23:37:06 +00:00
* TOOLS-23: init * added dependency * test * test * test * added projects * test * maven opts Xss2m * added all projects * test * disabled PR * enabled caching, enabled tip.jfrog proxy * fix path * sequential check * test2 * test3 * test4 * test5 * test6 * test * test * trigger 500 Internal Server Error * trigger * trigger * test * added sonar.pullrequest.branch * sonar.pullrequest.key * master branch * added dispatch event * fix maven user for jfrog * newline Co-authored-by: Eugene Taranov <eugene@taranov.me>
36 lines
944 B
YAML
36 lines
944 B
YAML
name: Trigger sonar analysis
|
|
|
|
on:
|
|
push:
|
|
branches: [ master ]
|
|
|
|
jobs:
|
|
sonar:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v2
|
|
with:
|
|
ref: master
|
|
- name: Trigger sonar analysis
|
|
run: |
|
|
echo URL "https://api.github.com/repos/${GITHUB_REPOSITORY}/dispatches"
|
|
|
|
for project in $(find . -exec test -f {}/pom.xml \; -printf '%f\n' -prune); do
|
|
echo "Triggering sonar analysis for project ${project}"
|
|
|
|
curl -s --location --request POST "https://api.github.com/repos/${GITHUB_REPOSITORY}/dispatches" \
|
|
--header "Authorization: Bearer ${{ secrets.TOKEN }}" \
|
|
--header "Content-Type: application/json" \
|
|
--data-raw "{
|
|
\"event_type\": \"matrix-sonar\",
|
|
\"client_payload\": {
|
|
\"project\": \"${project}\"
|
|
}
|
|
}"
|
|
|
|
sleep 1
|
|
|
|
done
|
|
|