I'm searching on how to disable the rollback process when my deployment is broken ( is on error) with XLDeploy ( using the plugin within jenkinsFile).
the following possible strategies for deployment failures. The XL Deploy task can
Rollback the deployment Cancel the deployment Leave the deployment as-is ( I'm looking for this option without roll back) Is there a flag to pass to the XLDeploy ( or any approch ) to make sure that there is no need to perform a rollback when the deployment is failing?
here is my jenkins file pipeline
stage('Deploy') {
xldDeploy serverCredentials: 'xld-admin', environmentId: 'Environments/env', packageId: 'Applications/app_new/1.0'
// where to put this option to cancel the rollback
}
When i look to the source code I found this one on https://github.com/jenkinsci/xldeploy-plugin/blob/f11cdceb0ecb1ede28386c40a6303520f7225abe/src/main/java/com/xebialabs/deployit/ci/server/DeployCommand.java /// snippet
} catch (RuntimeException e) {
try {
if (deploymentOptions.rollbackOnError) {
// perform a rollback
listener.error("Deployment failed, performing a rollback");
executeTask(deploymentService.rollback(taskId));
}
} finally {
throw new DeployitPluginException(e.getMessage());
}
i.e as i undrestand there is this flag that control the rollback ( active or not) haw to use it on my JnekinsFile
Thank you