如何使用Jenkins多分支pipe道将Docker镜像推送到DTR

我的问题是使用Jenkins多分支pipe道将docker映像推送到DTR。 我想以这样的方式configuration我的Jenkins文件,它将生成图像,然后按下它。

对于构build映像我将使用10.1.2.3机器和DTR将https://something.dtr01.eastus2.cloudapp.azure.com/

我对jenkins是全新的,根据我已经把示例Jenkins文件放在git仓库里的说明。

请build议我在Jenkisfile中的configuration更改

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 } } 

任何帮助将是可观的