Skip to content

Feature/314 enhance jenkins pipeline template to use updated package lifecycle#326

Merged
dennis-behm merged 15 commits into
IBM:mainfrom
monvora:feature/314-enhance-jenkins-pipeline-template-to-use-updated-package-lifecycle
Aug 7, 2025
Merged

Feature/314 enhance jenkins pipeline template to use updated package lifecycle#326
dennis-behm merged 15 commits into
IBM:mainfrom
monvora:feature/314-enhance-jenkins-pipeline-template-to-use-updated-package-lifecycle

Conversation

@monvora
Copy link
Copy Markdown
Member

@monvora monvora commented May 30, 2025

  • Create JenkinsfileWithWaziDeploy pipeline template to set up the pipeline using IBM Wazi Deploy as a deployment tool. The template use the updated package lifecycle to automatically compute the name of the package, the URL to be uploaded to artifact repository and the same URL to be downloaded for deployment.
  • Update readme.md for the JenkinsfileWithWaziDeploy
  • Fix broken links in the readme.md

Copy link
Copy Markdown
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.

@monvora Thanks for this new contribution. I have commented on your PR with a few remarks.

Comment thread Templates/JenkinsPipeline/JenkinsfileWithWaziDeploy Outdated
Comment thread Templates/JenkinsPipeline/JenkinsfileWithWaziDeploy
Comment thread Templates/JenkinsPipeline/JenkinsfileWithWaziDeploy Outdated
Comment thread Templates/JenkinsPipeline/JenkinsfileWithWaziDeploy Outdated
if (autoCancelled == false) {
// Start packageBuildOutputs.sh command
println("${PipelineName}[INFO]: Run packageBuildOutput.sh")
if (releaseVersion == "") {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could this be handled a bit more elegantly? Either by introducing a releaseVersionComputed flag that can be true/false?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe also use a condition based on PipelineType == "release"

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated

// Add -c ${WdConfigFile} option to the WdGenDeployPlanCmd to overwrite.
//def WdConfigFile = "/var/WaziDeploy/config/WaziDeploy-ConfigFile.yml"

WdGenDeployPlanCmd = "wazideploy-generate.sh -w ${WORKSPACE} -a ${AppName} -b ${AppBranch} -P ${PipelineType} -R ${releaseVersion} -I ${BuildNumber}"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe this command assumes that the pipeline is setup to publish the TAR to Artifactory/Nexus.
Do we need to make it conditional?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As what we did with GitLab, "Publish" to artifact repository value will be set in pipelineBackend.config file.

WdDeployCmd = 0
MsgHdr = "<strong>Packaging Step:</strong>"

WdDeployCmd = "wazideploy-deploy.sh -w ${WORKSPACE} -e ${WdEnvFileIntegration} -i ${AppName}.tar -l deploy/evidences/evidence.yaml"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

-t *.tar is ambiguous here. If the pipeline publishes to Artifactory, then this is no longer required.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

}
}
}
} // End: stage('Deployment-INT')
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please add the wazideploy-evidence.sh step as well do generate the deploymentReport html file?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @monvora to expand on the storing the produced evidences at a central location. I believe we need to do that not only on RC=0 but also when the deployment has failed.

There is one thing that I am missing - in the other pipelines, we have the wazideploy-evidence.sh script to render the deployment report html file. See the CBS details here

Can you please apply something similar like on the Gitlab template and then attach the report to the pipeline results?

@monvora
Copy link
Copy Markdown
Member Author

monvora commented Aug 4, 2025

@dennis-behm I addressed all your comments please review.

Copy link
Copy Markdown
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.

@monvora I have couple of suggestions for the README. Can you please take a look?

Comment thread Templates/JenkinsPipeline/README.md Outdated
Comment thread Templates/JenkinsPipeline/README.md Outdated
Comment thread Templates/JenkinsPipeline/README.md Outdated
Comment thread Templates/JenkinsPipeline/README.md Outdated
Comment thread Templates/JenkinsPipeline/README.md Outdated
* `SonarQube Analysis` stage to request a SonarQube scan of the application repository.
* `Packaging` stage
* to create a .TAR file package based on the [packageBuildOutputs.sh](https://github.com/IBM/dbb/blob/main/Templates/Common-Backend-Scripts/README.md#138---packageBuildOutputssh) script,
* to automatically compute the version of the next release for a release pipeline via [computeReleaseVersion.sh]((https://github.com/IBM/dbb/blob/main/Templates/Common-Backend-Scripts/README.md#137---computeReleaseVersionsh),
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't this have to be lsited before packageBuildOutputs?

Comment thread Templates/JenkinsPipeline/README.md Outdated
Comment thread Templates/JenkinsPipeline/README.md Outdated
Comment thread Templates/JenkinsPipeline/README.md Outdated
monvora and others added 8 commits August 7, 2025 19:50
Co-authored-by: Dennis Behm <dennis.behm@de.ibm.com>
Co-authored-by: Dennis Behm <dennis.behm@de.ibm.com>
Co-authored-by: Dennis Behm <dennis.behm@de.ibm.com>
Co-authored-by: Dennis Behm <dennis.behm@de.ibm.com>
Co-authored-by: Dennis Behm <dennis.behm@de.ibm.com>
Co-authored-by: Dennis Behm <dennis.behm@de.ibm.com>
Co-authored-by: Dennis Behm <dennis.behm@de.ibm.com>
Copy link
Copy Markdown
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.

Thanks for the new flavour of the Jenkins template with Wazi Deploy

@dennis-behm dennis-behm merged commit 3702f94 into IBM:main Aug 7, 2025
1 check 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