I'm attempting to setup a Jenkins pipeline that will deploy multiple components of an application in a single step. I was able to do this successfully with multiple deploy steps, but I would like to have it all in the same step to avoid multiple server restarts. According to IBM:
Versions to deploy. Specify multiple on a new line in the format component:version
pipeline {
agent any
stages {
stage('Deploy to TEST') {
steps {
step([$class: 'UCDeployPublisher',
siteName: 'mySite',
deploy: [
$class: 'com.urbancode.jenkins.plugins.ucdeploy.DeployHelper$DeployBlock',
deployApp: 'myApp',
deployEnv: 'TEST',
deployVersions: 'appComponent1:${appCom1Version}',
deployVersions: 'appComponent2:${appCom2Version}',
deployVersions: 'appComponent3:${appCom3Version}',
deployProc: 'Deploy',
deployOnlyChanged: false
]
])
}
}
}
}
Running this, it seems like it's falling through and only deploying the last component:version.
you can use delimiter
\n
to separate multiple components' version to install