BM5
This commit is contained in:
parent
5927174278
commit
b76da282f2
3
Jenkinsfile
vendored
3
Jenkinsfile
vendored
@ -381,11 +381,12 @@ def protectBranch(String repo, String branch) {
|
|||||||
curl -s -X 'POST' \
|
curl -s -X 'POST' \
|
||||||
'https://'"\$GIT_SERVER"'/api/v1/repos/${repo}/branch_protections' \
|
'https://'"\$GIT_SERVER"'/api/v1/repos/${repo}/branch_protections' \
|
||||||
-H 'Authorization: token '"\$GITEA_TOKEN" \
|
-H 'Authorization: token '"\$GITEA_TOKEN" \
|
||||||
|
-H 'Content-Type: application/json' \
|
||||||
-w '%{http_code}' \
|
-w '%{http_code}' \
|
||||||
-o output.json \
|
-o output.json \
|
||||||
-d @-)
|
-d @-)
|
||||||
test \$HTTP_CODE -eq 201
|
|
||||||
jq '.' output.json
|
jq '.' output.json
|
||||||
|
test \$HTTP_CODE -eq 201
|
||||||
""",
|
""",
|
||||||
returnStatus: true
|
returnStatus: true
|
||||||
) == 0
|
) == 0
|
||||||
|
Loading…
Reference in New Issue
Block a user