ci: use shared Gitea publish credential
这个提交包含在:
父节点
0d872e803c
当前提交
05146fe26d
6
Jenkinsfile
vendored
6
Jenkinsfile
vendored
@ -143,7 +143,11 @@ pipeline {
|
||||
def json = """{"tag_name":"${env.RELEASE_TAG}","name":"${env.RELEASE_TAG}","body":"${bodyEscaped}","draft":false,"prerelease":false}"""
|
||||
writeFile file: 'release_payload.json', text: json
|
||||
|
||||
withCredentials([string(credentialsId: 'GITEA_TOKEN', variable: 'TOKEN')]) {
|
||||
withCredentials([usernamePassword(
|
||||
credentialsId: 'gitea-access-token',
|
||||
usernameVariable: 'GITEA_USER',
|
||||
passwordVariable: 'TOKEN'
|
||||
)]) {
|
||||
bat """curl -sf -X POST "${env.GITEA_API_BASE}/repos/${env.GITEA_REPO_PATH}/releases" -H "Authorization: token %TOKEN%" -H "Content-Type: application/json" -d @release_payload.json"""
|
||||
}
|
||||
bat 'del release_payload.json'
|
||||
|
||||
正在加载...
在新工单中引用
屏蔽一个用户