-
Notifications
You must be signed in to change notification settings - Fork 146
Refactor Jenkinsfile to use zBuilder + various improvements to match current Jenkins versions #377
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.