diff --git a/Jenkinsfile b/Jenkinsfile index 918295f..0ef5ff8 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -381,11 +381,12 @@ def protectBranch(String repo, String branch) { curl -s -X 'POST' \ 'https://'"\$GIT_SERVER"'/api/v1/repos/${repo}/branch_protections' \ -H 'Authorization: token '"\$GITEA_TOKEN" \ + -H 'Content-Type: application/json' \ -w '%{http_code}' \ -o output.json \ -d @-) - test \$HTTP_CODE -eq 201 jq '.' output.json + test \$HTTP_CODE -eq 201 """, returnStatus: true ) == 0