mirror of
https://github.com/SAP/jenkins-library.git
synced 2025-01-18 05:18:24 +02:00
Introduce new flag to run artifact versioning on a pod for maven projects (#2788)
* Introduce new flag to run artifact versionining for maven on pod * Add code review changes
This commit is contained in:
parent
05973a8fcd
commit
363600ce9f
@ -43,7 +43,12 @@ import static com.sap.piper.Prerequisites.checkScript
|
||||
*/
|
||||
'projectName',
|
||||
/**
|
||||
* Defines the library resource containing stage/step initialization settings. Those define conditions when certain steps/stages will be activated. **Caution: changing the default will break the standard behavior of the pipeline - thus only relevant when including `Init` stage into custom pipelines!**
|
||||
* Specify to execute artifact versioning in a kubernetes pod.
|
||||
* @possibleValues `true`, `false`
|
||||
*/
|
||||
'runArtifactVersioningOnPod',
|
||||
/**
|
||||
* Defines the library resource containing stage/step initialization settings. Those define conditions when certain steps/stages will be activated. **Caution: changing the default will break the standard behavior of the pipeline - thus only relevant when including `Init` stage into custom pipelines!**
|
||||
*/
|
||||
'stageConfigResource',
|
||||
/**
|
||||
@ -201,7 +206,7 @@ void call(Map parameters = [:]) {
|
||||
if (config.inferBuildTool) {
|
||||
prepareVersionParams.buildTool = buildTool
|
||||
}
|
||||
if (env.ON_K8S) {
|
||||
if (env.ON_K8S && !config.runArtifactVersioningOnPod) {
|
||||
// We force dockerImage: "" for the K8S case to avoid the execution of artifactPrepareVersion in a K8S Pod.
|
||||
// Since artifactPrepareVersion may need the ".git" folder in order to push a tag, it would need to be part of the stashing.
|
||||
// There are however problems with tar-ing this folder, which results in a failure to copy the stash back -- without a failure of the pipeline.
|
||||
|
Loading…
x
Reference in New Issue
Block a user