almost entirely works
All checks were successful
gitea.arg.rip/deployment/pipeline/head This commit looks good
All checks were successful
gitea.arg.rip/deployment/pipeline/head This commit looks good
webhook linking doesn't. don't know why. Oh well.
This commit is contained in:
parent
622e269bd3
commit
6e55bc1ed2
@ -101,7 +101,8 @@ pipeline {
|
|||||||
-H 'Content-Type: application/json' \
|
-H 'Content-Type: application/json' \
|
||||||
-d '{
|
-d '{
|
||||||
"users": {
|
"users": {
|
||||||
"@adam:greyn.club": 100
|
"@adam:greyn.club": 100,
|
||||||
|
"@jenkins:greyn.club": 50
|
||||||
}
|
}
|
||||||
}'
|
}'
|
||||||
""").trim()
|
""").trim()
|
||||||
@ -118,7 +119,10 @@ pipeline {
|
|||||||
-H 'authorization: token ${env.JENKINSONGITEA}' \
|
-H 'authorization: token ${env.JENKINSONGITEA}' \
|
||||||
>reporesponse.json
|
>reporesponse.json
|
||||||
|
|
||||||
cat reporesponse.json
|
cat reporesponse.json
|
||||||
|
cat reporesponse.json | jq '.[] | select(.type=="matrix")' >matrixhook.json
|
||||||
|
cat matrixhook.json
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
sh """
|
sh """
|
||||||
@ -130,13 +134,13 @@ pipeline {
|
|||||||
"content_type": "json",' >request.json
|
"content_type": "json",' >request.json
|
||||||
echo "\\"url\\": \\"https://greyn.club:8448/_matrix/client/r0/rooms/\$(echo ${env.room_id} | sed 's/!/%21/')/send/m.room.message\\"" >>request.json
|
echo "\\"url\\": \\"https://greyn.club:8448/_matrix/client/r0/rooms/\$(echo ${env.room_id} | sed 's/!/%21/')/send/m.room.message\\"" >>request.json
|
||||||
echo "}," >>request.json
|
echo "}," >>request.json
|
||||||
echo "\\"events\\": \$(cat reporesponse.json | jq .[0].events)" >>request.json
|
echo "\\"events\\": \$(cat matrixhook.json | jq .[0].events)" >>request.json
|
||||||
echo '}' >>request.json
|
echo '}' >>request.json
|
||||||
|
|
||||||
cat request.json
|
cat request.json
|
||||||
"""
|
"""
|
||||||
sh """
|
sh """
|
||||||
curl -X 'PATCH' "https://gitea.arg.rip/api/v1/repos/beefhavers/${videoname}/hooks/\$(cat reporesponse.json | jq .[0].id)" \
|
curl -X 'PATCH' "https://gitea.arg.rip/api/v1/repos/beefhavers/${videoname}/hooks/\$(cat matrixhook.json | jq .[0].id)" \
|
||||||
-H 'accept: application/json' \
|
-H 'accept: application/json' \
|
||||||
-H 'authorization: token ${env.JENKINSONGITEA}' \
|
-H 'authorization: token ${env.JENKINSONGITEA}' \
|
||||||
-H 'Content-Type: application/json' \
|
-H 'Content-Type: application/json' \
|
||||||
@ -144,6 +148,7 @@ pipeline {
|
|||||||
|
|
||||||
rm request.json
|
rm request.json
|
||||||
rm reporesponse.json
|
rm reporesponse.json
|
||||||
|
rm matrixhook.json
|
||||||
"""
|
"""
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user