-
Notifications
You must be signed in to change notification settings - Fork 830
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
[JENKINS-34085] Added support for Versionnumber Plugin (https://wiki.jenkins-ci.org/d… #818
[JENKINS-34085] Added support for Versionnumber Plugin (https://wiki.jenkins-ci.org/d… #818
Conversation
Thank you for this pull request! Please check this document for how the Jenkins project handles pull requests. |
this.environmentPrefixVariable = environmentPrefixVariable | ||
} | ||
|
||
void skipFailedBuilds(boolean skipFailedBuilds) { |
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.
Please set the default parameter values to true. Further details: https://github.com/jenkinsci/job-dsl-plugin/blob/master/CONTRIBUTING.md
@@ -1488,4 +1488,39 @@ class WrapperContextSpec extends Specification { | |||
'key1' | 'key2' | 'key3' | null | 'key1' | 'key2' | 'key3' | '' | |||
'key1' | 'key2' | 'key3' | 'key4' | 'key1' | 'key2' | 'key3' | 'key4' | |||
} | |||
|
|||
def 'call versionNumber'() { |
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.
Sorry about this, I didn't review your test case, would you mind adding another TestCase for call versionNumber with all options'
Instead of fixing this PR, we can use the upcoming generic DSL support (#816) for the Version Number plugin. Example: job('example') {
wrappers {
versionNumberBuilder {
versionNumberString('1.0.0')
environmentVariableName('VERSION')
useAsBuildDisplayName(true)
projectStartDate('2012-05-04')
environmentPrefixVariable(null)
buildsToday(null)
buildsThisWeek(null)
buildsThisMonth(null)
buildsThisYear(null)
buildsAllTime(null)
skipFailedBuilds(false)
}
}
} To be able to use |
job('example') { | ||
wrappers { | ||
versionNumber('1.0.0.${BUILDS_ALL_TIME}', 'VERSION') { | ||
startDate() |
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.
try to find a better example with some values instead of just calling all methods without options
@daspilker |
@Reamer see my comment in JIRA: JENKINS-34085 |
Added support for Versionnumber Plugin (https://wiki.jenkins-ci.org/display/JENKINS/Version+Number+Plugin)