diff --git a/scripts/beefhaving_video.groovy b/scripts/beefhaving_video.groovy index 0231531..5384bc9 100644 --- a/scripts/beefhaving_video.groovy +++ b/scripts/beefhaving_video.groovy @@ -47,7 +47,8 @@ pipeline { } stage("create matrix room"){ 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' \ -H 'accept: application/json' \ -H 'Authorization: Bearer ${JENKINSMATRIX}}' \ @@ -61,7 +62,9 @@ pipeline { "invite": ["@adam:greyn.club", "@gitea:greyn.club"], "topic": "[link to gitea project]" }' | jq .room_id - """).trim() + """ + ).trim() + } } stage("link gitea webhook"){ steps{ @@ -79,16 +82,16 @@ pipeline { -H 'Content-Type: application/json' \ -d '{ "active": true, - "authorization_header": $$(cat reporesponse.json | jq .[0].authorization_header), + "authorization_header": \$(cat reporesponse.json | jq .[0].authorization_header), "branch_filter": "*", "config": { "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) }' """ } } } -} \ No newline at end of file +}