我的问题陈述是使用Jenkins multibranch管道将docker镜像推送到DTR。 我想以这样的方式配置我的Jenkins文件,它将构建图像,然后推送它。
用于构建图像我将使用10.1.2.3机器,DTR将为https://something.dtr01.eastus2.cloudapp.azure.com/
根据我将样本Jenkins文件放在git repo中的说明,我对Jenkins完全不熟悉。
请告诉我Jenkisfile中的配置更改
node {
// Clean workspace before doing anything
deleteDir()
try {
stage ('Clone') {
checkout scm
}
stage ('Build') {
"echo 'shell scripts to build project...'"
}
stage ('Tests') {
parallel 'static': {
sh "echo 'shell scripts to run static tests...'"
},
'unit': {
sh "echo 'shell scripts to run unit tests...'"
},
'integration': {
sh "echo 'shell scripts to run integration tests...'"
}
}
stage ('Deploy') {
sh "echo 'shell scripts to deploy to server...'"
}
} catch (err) {
currentBuild.result = 'FAILED'
throw err
}
}
任何帮助都会很明显