ci: support Windows SSH credential binding
这个提交包含在:
父节点
b1141bcacc
当前提交
0e728e1f7b
6
Jenkinsfile
vendored
6
Jenkinsfile
vendored
@ -110,10 +110,14 @@ print('versions.json updated: symbolicator = ${env.IMAGE_VERSION}')
|
||||
|
||||
stage('Commit Version') {
|
||||
steps {
|
||||
sshagent(credentials: ['jenkins-ssh-key']) {
|
||||
withCredentials([sshUserPrivateKey(
|
||||
credentialsId: 'jenkins-ssh-key',
|
||||
keyFileVariable: 'GIT_SSH_KEY'
|
||||
)]) {
|
||||
script {
|
||||
bat """
|
||||
chcp 65001 >nul
|
||||
set "GIT_SSH_COMMAND=ssh -i %GIT_SSH_KEY% -o IdentitiesOnly=yes"
|
||||
git config user.email "jenkins@xuqm.com"
|
||||
git config user.name "Jenkins CI"
|
||||
git add ${env.VERSION_FILE}
|
||||
|
||||
@ -45,5 +45,8 @@ docker build -t xuqm-symbolicator:local .
|
||||
|
||||
- 不得恢复 `npm install` 容器构建或忽略锁文件。
|
||||
- 不得把 Jenkins 仓库地址改回包含 Token 的 URL;现有 SSH credentials 方案是基线。
|
||||
- Windows Jenkins 的 OpenSSH Agent 以系统服务运行,`ssh-agent` Pipeline 插件无法解析
|
||||
其空输出;Git 推送必须通过 `sshUserPrivateKey` 临时文件和当前进程
|
||||
`GIT_SSH_COMMAND` 使用密钥,禁止退回凭据化 URL。
|
||||
- 不得在日志中输出认证信息或完整异常输入。
|
||||
- 不得在没有显式限额与清理策略时启用 multipart 上传。
|
||||
|
||||
正在加载...
在新工单中引用
屏蔽一个用户