Idea discussed with Alvaro Lobato: introduce an "options" Map<String,
Object> as a parameter of withMaven(). We will also make these options
configurable at the Jenkins global level then at the folder level.
See sample below
node {
stage ("build") {
git "https://github.com/spring-projects/spring-petclinic.git"
withMaven(
maven: 'maven-3.3.9',
mavenSettingsConfig: 'maven-settings-for-gameoflife',
options: [
skipArchiveGeneratedArtifacts: true,
fingerprintDependenciesExclude: "org.springframework.*"]
) {
sh "mvn clean package"
}
}
}
On Friday, April 14, 2017 at 12:37:40 PM UTC+2, Cyrille Le Clerc wrote:
>
> Hello Valentina,
>
> We are going to look at this soon.
>
> We have requests to have a more elegant solution to disable reporters (see
> JENKINS-43596
> Add withMaven options for skipping
> <https://issues.jenkins-ci.org/browse/JENKINS-43596>).
> We don't know yet what would be the right syntax to add configuration
> flags that could be consumed by the withMaven step itself or by reporters
> (JUnit, archiver, FindBugs, Task Scanner...).
>
> Cyrille
>
>
> On Wednesday, March 22, 2017 at 11:13:23 AM UTC+1, Valentina Armenise
> wrote:
>>
>> Hi,
>>
>> I'd like to customize the withMaven step from the Pipeline Maven Plugin
>> to take as input the parameters which you would normally pass to a
>> publisher. Specifically I'd like to be able to do something like
>>
>> step([$class: 'FindBugsPublisher', canRunOnFailed: true, defaultEncoding:
>> 'UTF-8', excludePattern: '', healthy: '', includePattern: '', pattern:
>> '**/target/findbugsXml.xml', shouldDetectModules: true, unHealthy: '',
>> unstableTotalAll: '0', useStableBuildAsReference : true])
>>
>>
>> In order to define the thresholds or other things..
>>
>>
>> Looking at the code, does not seem to be possible today. Is it correct?
>>
>>
--
You received this message because you are subscribed to the Google Groups
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/jenkinsci-users/b91d959e-20cb-45f2-86ce-405aa9e32a01%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.