This commit is contained in:
Semyon Bezrukov 2024-09-11 18:01:22 +03:00
parent bbe929fce2
commit d67feb347c

10
Jenkinsfile vendored
View File

@ -358,11 +358,15 @@ def printBranches(String repo) {
return sh (
label: "${repo}: branches list",
script: """
curl -s -X 'GET' \
HTTP_CODE=\$(curl -s -X 'GET' \
'https://'"\$GIT_SERVER"'/api/v1/repos/${repo}/branches' \
-H 'accept: application/json' \
-H 'Authorization: '"\$GITEA_TOKEN" | \
jq -r '.[] | [.name, .protected] | @tsv'
-H 'Authorization: '"\$GITEA_TOKEN"
-w "%{http_code}\n"
-o output.json)
echo \$HTTP_CODE
cat output.json
jq -r '.[] | [.name, .protected] | @tsv' output.json
""",
returnStatus: true
) == 0