This commit is contained in:
Semyon Bezrukov 2024-09-11 18:32:25 +03:00
parent 5927174278
commit b76da282f2

3
Jenkinsfile vendored
View File

@ -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