jenkinsci / servicenow-cicd-plugin

ServiceNow CI/CD Jenkins Plugin. This plugin provides build steps with easy parameter setup to help users get started faster with setting up a CI and CD pipeline for developing apps on the Now Platform.
https://plugins.jenkins.io/servicenow-cicd/
MIT License
7 stars 29 forks source link

Support for exact semantic versioning #34

Open moritzrupp opened 1 year ago

moritzrupp commented 1 year ago

What feature do you want to see added?

Currently, the Jenkins ServiceNow CI/CD plugin only supports the following mechanisms for the application version:

Exact versioning by providing MAJOR.MINOR.PATCH is currently not supported (see GitHub Action as a reference).

I would like to see the exact versionin in the Jenkins plugin as well, so that we can decide on the exact semantic version.

Upstream changes

No response

moritzrupp commented 1 year ago

Hi,

after analysing the code, I have observed that this functionality is already implictly available:

https://github.com/jenkinsci/servicenow-cicd-plugin/blob/e4a0a274037440f82ff2fd3ed5160fb444682eff/src/main/java/io/jenkins/plugins/servicenow/PublishAppBuilder.java#L266-L276

Line 274 covers this. If the appVersion only contains two numbers (MAJOR.MINOR), the patch is automatically derived from the build number, if automatic calculatation is not checked. However, if appVersion contains three number (MAJOR.MINRO.PATCH), it uses the exactly provided version number.

I will continue with testing and if it works, I'll update the documentation to highlight this functionality.

Thanks Moritz