syntax fixed i think
This commit is contained in:
parent
9009120546
commit
bd45a49691
@ -47,7 +47,8 @@ pipeline {
|
|||||||
}
|
}
|
||||||
stage("create matrix room"){
|
stage("create matrix room"){
|
||||||
steps{
|
steps{
|
||||||
env.roomId=sh(returnStdout: true, script: """curl -X 'POST' \
|
env.roomId=sh(returnStdout: true, script: """
|
||||||
|
curl -X 'POST' \
|
||||||
'https://greyn.club:8448/_matrix/client/v3/createRoom' \
|
'https://greyn.club:8448/_matrix/client/v3/createRoom' \
|
||||||
-H 'accept: application/json' \
|
-H 'accept: application/json' \
|
||||||
-H 'Authorization: Bearer ${JENKINSMATRIX}}' \
|
-H 'Authorization: Bearer ${JENKINSMATRIX}}' \
|
||||||
@ -61,7 +62,9 @@ pipeline {
|
|||||||
"invite": ["@adam:greyn.club", "@gitea:greyn.club"],
|
"invite": ["@adam:greyn.club", "@gitea:greyn.club"],
|
||||||
"topic": "[link to gitea project]"
|
"topic": "[link to gitea project]"
|
||||||
}' | jq .room_id
|
}' | jq .room_id
|
||||||
""").trim()
|
"""
|
||||||
|
).trim()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
stage("link gitea webhook"){
|
stage("link gitea webhook"){
|
||||||
steps{
|
steps{
|
||||||
@ -79,16 +82,16 @@ pipeline {
|
|||||||
-H 'Content-Type: application/json' \
|
-H 'Content-Type: application/json' \
|
||||||
-d '{
|
-d '{
|
||||||
"active": true,
|
"active": true,
|
||||||
"authorization_header": $$(cat reporesponse.json | jq .[0].authorization_header),
|
"authorization_header": \$(cat reporesponse.json | jq .[0].authorization_header),
|
||||||
"branch_filter": "*",
|
"branch_filter": "*",
|
||||||
"config": {
|
"config": {
|
||||||
"content_type": "json",
|
"content_type": "json",
|
||||||
"url": "https://greyn.club:8448/_matrix/client/r0/rooms/$$(echo ${env.roomId} | sed 's/!/%21/')/send/m.room.message"
|
"url": "https://greyn.club:8448/_matrix/client/r0/rooms/\$(echo ${env.roomId} | sed 's/!/%21/')/send/m.room.message"
|
||||||
},
|
},
|
||||||
"events": $$(cat reporesponse.json | jq .[0].events)
|
"events": \$(cat reporesponse.json | jq .[0].events)
|
||||||
}'
|
}'
|
||||||
"""
|
"""
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user