Refactor Jenkinsfile to use zBuilder + various improvements to match current Jenkins versions#377
Refactor Jenkinsfile to use zBuilder + various improvements to match current Jenkins versions#377Woodsmithkenny wants to merge 1 commit intoIBM:mainfrom
Conversation
graphics as the PNG graphics have been deprecated from Jenkins. Improved status reporting for various stages. Make icons consistent.
dennis-behm
left a comment
There was a problem hiding this comment.
@Woodsmithkenny Thanks Kenny for the improvements /uplift of the template!
Would you mind taking a look to the below comments?
| choices : ["major", "minor", "patch"], | ||
| choices : ["patch", "minor", "major"], | ||
| description: 'Please provide the release type for automated computing of tags', | ||
| defaultValue: 'patch', |
There was a problem hiding this comment.
I believe, we should keep the defaultValue and set it to minor.
The patch level is for hot fixes, and major for breaking changes.
minor should be the norm with mainframe applications.
| defaultValue: 'no', | ||
| name: 'PipelineVerboseLogging' | ||
| ), | ||
| choice( |
There was a problem hiding this comment.
There should not be a choice for the build lifecycle. The build lifecycle is expected to be determined by the CBS for zBuilder.sh - please take a look at the descriptions in this section: https://github.com/IBM/dbb/tree/main/Templates/Common-Backend-Scripts#build-stage
| description: 'The zBuilder lifecycle type to run' | ||
| ), | ||
|
|
||
| string( |
There was a problem hiding this comment.
I might have missed something, but I don't see the parameter being used in the script. In addition, this is a multi-branch pipeline. Users should not be required to select which branch to build.
| } | ||
|
|
||
| BuildCmd = "dbbBuild.sh -w ${BuildDir} -a ${AppName} -b ${AppBranch} -p ${PipelineType} -q ${AppHLQ} ${zAppBuildVerbose}" | ||
| BuildCmd = "${PIPELINE_SCRIPTS}/zBuilder.sh -w ${BuildDir} -a ${AppName} -b ${AppBranch} -p ${PipelineType} -t ${Lifecycle} -q ${AppHLQ} ${zBuildVerbose}" |
There was a problem hiding this comment.
Lifecycle should be defined by the CBS internally and not a user input.
| println("${PipelineName}[INFO]: UCD Component Version URL: ${ucdVersionUrl}") | ||
| createSummary icon:"accept.svg", text: "${MsgHdr} <a href=\'$ucdVersionUrl\' target=\'_other\'>UCD Component Version (name: $ucdVersionName)</a>" | ||
| Msg = "Package succesfully created." | ||
| println("${PipelineName}[INFO]:") |
There was a problem hiding this comment.
Missing to pass the Msg to println
| println("${PipelineName}[INFO]:") | |
| println("${PipelineName}[INFO]: ${Msg}") |
| } else { | ||
| Msg = "Fetching the UCD Component Version URL failed. Please check ${ucdBuzToolLogName}" | ||
| createSummary icon:"warning.svg", text: "${MsgHdr} ${Msg}" | ||
| addSummary icon:"symbol-warning-outline plugin-ionicons-api", text: "${MsgHdr} ${Msg}", style: "color: var(--warning-color)" |
There was a problem hiding this comment.
Should the message also be printed to the console output, like on the other stages?
| } | ||
| } else { | ||
| Msg = "Fetching the UCD Component Version Name failed. Please check ${ucdBuzToolLogName}" | ||
| println("${PipelineName}[WARN]: ${Msg}") |
There was a problem hiding this comment.
Is this a WARN state or rather an ERROR state? I feel that it can rather be a ERROR if the UCD packaging failed.
Refactor Jenkinsfile to use zBuilder.