Skip to content

Conversation

@Woodsmithkenny
Copy link

Refactor Jenkinsfile to use zBuilder.

  • Added metadata option to the lifecycle
  • Removed default options for choice params ('default' parm is an invalid parm for the Choice option for Jenkinsfile). Instead the first option listed is the default option in the drop down.
  • Changed status icons to use svg graphics as the PNG graphics have been deprecated from Jenkins. See https://www.jenkins.io/blog/2022/06/20/svg-icon-migration/
  • Improved status reporting for various stages. Make icons consistent.
  • Use addSummary over the deprecated createSummary.
  • Add variable for the ucdBuztoolProps to use the CBS property files rather than static MortgageAppArtifactRepository.properties.

graphics as the PNG graphics have been deprecated from Jenkins. Improved
status reporting for various stages. Make icons consistent.
Copy link
Member

@dennis-behm dennis-behm left a 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',
Copy link
Member

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(
Copy link
Member

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(
Copy link
Member

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}"
Copy link
Member

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]:")
Copy link
Member

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

Suggested change
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)"
Copy link
Member

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}")
Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants