This commit is contained in:
Semyon Bezrukov 2024-09-11 18:55:27 +03:00
parent dfd04e1bf4
commit 8ddeceb0f9

8
Jenkinsfile vendored
View File

@ -29,7 +29,6 @@ pipeline {
environment {
GIT_SERVER = 'git.onlyoffice.com'
GITEA_TOKEN = credentials('gitea-token')
GITHUB_TOKEN = credentials('github-token')
TELEGRAM_TOKEN = credentials('telegram-bot-token')
}
options {
@ -376,7 +375,12 @@ def protectBranch(String repo, String branch) {
label: "${repo}: protect ${branch}",
script: """
HTTP_CODE=\$(echo '{
"branch_name": "${branch}"
"branch_name": "${branch}",
"enable_push": true,
"enable_push_whitelist": true,
"push_whitelist_usernames": [
"heatray"
]
}' | \
curl -s -X 'POST' \
'https://'"\$GIT_SERVER"'/api/v1/repos/${repo}/branch_protections' \