Re: Best practices add tags/labels/attributes to jobs and runs?

2022-10-04 Thread Cyrille Le Clerc
Thanks link89.

I was hoping to be able to leverage existing standard Jenkins capabilities. 
Creating an OpenTelemetry specific tagging mechanism is indeed an option if 
we don't find standard solutions.

On Monday, September 26, 2022 at 2:37:54 AM UTC+2 link89 wrote:

> How about creating a dedicated parameter to store tags? 
>
> On Thursday, September 15, 2022 at 5:30:07 PM UTC+8 cyrille...@elastic.co 
> wrote:
>
>> Dear Jenkins Community,
>>
>> The Jenkins OpenTelemetry Plugin 
>>  is looking at 
>> mechanism to add key-value tags/attributes to annotate the traces, logs, 
>> and metrics we produce from job executions.
>> These key-value 
>>
>> *Can the community please help me understand what are the best practices 
>> to associate tags/attributes/labels to jobs and runs?*
>>
>> Note that I found the promising Job Tags plugin 
>>  but it's value tags rather than 
>> key-value tags so it may be a challenge for my use case.
>>
>> Cyrille
>>
>

-- 
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 jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/cb7e9bbe-bae4-4faf-ae55-1ed4baeae1e9n%40googlegroups.com.


Best practices add tags/labels/attributes to jobs and runs?

2022-09-15 Thread 'Cyrille Le Clerc' via Jenkins Users
Dear Jenkins Community,

The Jenkins OpenTelemetry Plugin 
 is looking at mechanism 
to add key-value tags/attributes to annotate the traces, logs, and metrics 
we produce from job executions.
These key-value 

*Can the community please help me understand what are the best practices to 
associate tags/attributes/labels to jobs and runs?*

Note that I found the promising Job Tags plugin 
 but it's value tags rather than 
key-value tags so it may be a challenge for my use case.

Cyrille

-- 
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 jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/81344e60-eb64-47f3-9eb3-c0c3317f402fn%40googlegroups.com.


Re: The Pipeline Maven Plugin is not replacing the config in global settings.xml from jenkins credentials

2019-10-02 Thread Cyrille Le Clerc
Hello,

This is one of the most broadly used feature of the pipeline-maven-plugin, 
I think it works for most user, there is probably a glitch somewhere.

Can you please share your testing Jenkinsfile and the details reported by 
withMaven in the build logs?

The troubleshooting pipeline script should look like

withMaven(...) {
   sh "mvn help:effective-settings"
}

The build logs line that reports the credentials injected in the settings 
looks like

> [withMaven] using Maven global settings.xml 
> 'global-settings-for-pipeline-maven-plugin' with Maven servers credentials 
> provided by Jenkins (replaceAll: false): [mavenServerId: 'github', 
> jenkinsCredentials: 'github-credentials', username: 'cyrille-leclerc', 
> type: 'UsernamePasswordCredentialsImpl'], [mavenServerId: 
> 'nexus3.example.com', jenkinsCredentials: 
> 'api-team-nexus-deployment-credentials', username: 'api-team', type: 
> 'UsernamePasswordCredentialsImpl']




On Friday, September 27, 2019 at 4:57:11 PM UTC-4, red 888 wrote:
>
> I also opened an SO post for this issue: 
> https://stackoverflow.com/questions/58139761/pipeline-maven-plugin-not-replacing-servers-in-global-settings-xml-from-jenkin
>
> I wonder if the plugin is broken or not working correctly for multibranch 
> pipelines? I can create a maven config file and in the "Content" all the 
> settings work, but configuring "Server Credentials" with a jenkins 
> credential binding is not replacing the "" section- seems to just 
> ignore it.
>
> for now I have to hard code my "" secrets and all right 
> in the content of the config file because the credentials arent working
>

-- 
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 jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/d3bcb320-54d2-45d2-aeb1-a6c3944bb5e4%40googlegroups.com.


Re: Jenkins Pipeline Maven Plugin - Always skipping downstream job

2019-08-05 Thread Cyrille Le Clerc
You're welcome

-- 
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 jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/4c028c32-1faa-4ddb-af19-3ae20295b4cc%40googlegroups.com.


Re: Jenkins Pipeline Maven Plugin - Always skipping downstream job

2019-08-04 Thread Cyrille Le Clerc
@drpm can you please verify that version 3.8.1 fixes your problem of 
downstream pipelines not being triggered when using the Authorize Project 
Plugin

https://github.com/jenkinsci/pipeline-maven-plugin/releases/tag/pipeline-maven-3.8.1

On Friday, August 2, 2019 at 4:04:26 PM UTC+2, Cyrille Le Clerc wrote:
>
> @drpm can you test 
> https://github.com/jenkinsci/pipeline-maven-plugin/pull/224 ?
>
> @daniel could you kindly review the code of 
> https://github.com/jenkinsci/pipeline-maven-plugin/pull/224 it is a 
> simple change ?
>
> On Friday, August 2, 2019 at 12:12:01 PM UTC+2, Cyrille Le Clerc wrote:
>>
>> Thank you very much Daniel, I'll have a look
>>
>> On Friday, August 2, 2019 at 12:04:04 PM UTC+2, Daniel Beck wrote:
>>>
>>>
>>>
>>> > On 2. Aug 2019, at 11:49, Cyrille Le Clerc  
>>> wrote: 
>>> > 
>>> > Do you understand why the downstream pipeline is seen as 
>>> unauthenticated? Could there be a configuration glitch on your setup? 
>>> > 
>>>
>>> My guess, not having debugged this further: 
>>>
>>> Pipeline Maven Plugin seems to have copied code from ReverseBuildTrigger 
>>> in core (see your code snippet, 'cf. BuildTrigger') that wasn't adapted to 
>>> JENKINS-22949 in https://jenkins.io/changelog/#v2.62 
>>>
>>> See 
>>> https://github.com/jenkinsci/jenkins/commit/915543dca5399d3ba052219ddfe9c3c061e70726
>>>  
>>> for the change -- there's no need to set the auth to ANONYMOUS anymore if 
>>> it's SYSTEM otherwise. 
>>>
>>>

-- 
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 jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/85bd263e-2a8e-4eb7-8c57-a51992c638b3%40googlegroups.com.


Re: Jenkins Pipeline Maven Plugin - Always skipping downstream job

2019-08-02 Thread Cyrille Le Clerc
@drpm can you test 
https://github.com/jenkinsci/pipeline-maven-plugin/pull/224 ?

@daniel could you kindly review the code of 
https://github.com/jenkinsci/pipeline-maven-plugin/pull/224 it is a simple 
change ?

On Friday, August 2, 2019 at 12:12:01 PM UTC+2, Cyrille Le Clerc wrote:
>
> Thank you very much Daniel, I'll have a look
>
> On Friday, August 2, 2019 at 12:04:04 PM UTC+2, Daniel Beck wrote:
>>
>>
>>
>> > On 2. Aug 2019, at 11:49, Cyrille Le Clerc  
>> wrote: 
>> > 
>> > Do you understand why the downstream pipeline is seen as 
>> unauthenticated? Could there be a configuration glitch on your setup? 
>> > 
>>
>> My guess, not having debugged this further: 
>>
>> Pipeline Maven Plugin seems to have copied code from ReverseBuildTrigger 
>> in core (see your code snippet, 'cf. BuildTrigger') that wasn't adapted to 
>> JENKINS-22949 in https://jenkins.io/changelog/#v2.62 
>>
>> See 
>> https://github.com/jenkinsci/jenkins/commit/915543dca5399d3ba052219ddfe9c3c061e70726
>>  
>> for the change -- there's no need to set the auth to ANONYMOUS anymore if 
>> it's SYSTEM otherwise. 
>>
>>

-- 
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 jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/090a4939-84f7-42c2-b94e-07c45d557b67%40googlegroups.com.


Re: Jenkins Pipeline Maven Plugin - Always skipping downstream job

2019-08-02 Thread Cyrille Le Clerc
Thank you very much Daniel, I'll have a look

On Friday, August 2, 2019 at 12:04:04 PM UTC+2, Daniel Beck wrote:
>
>
>
> > On 2. Aug 2019, at 11:49, Cyrille Le Clerc  > wrote: 
> > 
> > Do you understand why the downstream pipeline is seen as 
> unauthenticated? Could there be a configuration glitch on your setup? 
> > 
>
> My guess, not having debugged this further: 
>
> Pipeline Maven Plugin seems to have copied code from ReverseBuildTrigger 
> in core (see your code snippet, 'cf. BuildTrigger') that wasn't adapted to 
> JENKINS-22949 in https://jenkins.io/changelog/#v2.62 
>
> See 
> https://github.com/jenkinsci/jenkins/commit/915543dca5399d3ba052219ddfe9c3c061e70726
>  
> for the change -- there's no need to set the auth to ANONYMOUS anymore if 
> it's SYSTEM otherwise. 
>
>

-- 
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 jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/74b51013-9cb7-4bb1-87e4-a4e33bd29f78%40googlegroups.com.


Re: Jenkins Pipeline Maven Plugin - Always skipping downstream job

2019-08-02 Thread Cyrille Le Clerc
Thanks,

Could you by any chance create a bug on https://issues.jenkins-ci.org with 
the label pipeline-maven-plugin detailing the problem so that it will be 
easier to manage and easier to share knowledge with other users?

Do you understand why the downstream pipeline is seen as unauthenticated? 
Could there be a configuration glitch on your setup?

Cyrille

On Friday, August 2, 2019 at 11:32:57 AM UTC+2, drpm wrote:
>
> Oh It is using the anonymous user for it.
>
> isUpstreamBuildVisibleByDownstreamBuildAuth(org.jenkinsci.plugins.workflow.job.WorkflowJob@3e3adefa[],
>  
>> org.jenkinsci.plugins.workflow.job.WorkflowJob@7b2c0800[]): 
>> taskAuth: 
>> org.acegisecurity.providers.UsernamePasswordAuthenticationToken@1f: 
>> Username: SYSTEM; Password: [PROTECTED]; Authenticated: false; Details: 
>> null; Not granted any authorities, downstreamPipelineAuth: 
>> org.acegisecurity.providers.anonymous.AnonymousAuthenticationToken@ffc4: 
>> Username: *anonymous*; Password: [PROTECTED]; Authenticated: true; 
>> Details: null; Granted Authorities: anonymous, 
>> upstreamPipelineObtainedAsImpersonated:null, result: false
>>
>
>
> On Friday, August 2, 2019 at 6:15:48 PM UTC+9, Cyrille Le Clerc wrote:
>>
>> Can you please enable FINER 
>> on org.jenkinsci.plugins.pipeline.maven.service.PipelineTriggerService ? I 
>> am interested by the message of 
>> isUpstreamBuildVisibleByDownstreamBuildAuth
>>
>>
>> https://github.com/jenkinsci/pipeline-maven-plugin/blob/pipeline-maven-3.8.0/jenkins-plugin/src/main/java/org/jenkinsci/plugins/pipeline/maven/service/PipelineTriggerService.java#L332
>>
>> public boolean isUpstreamBuildVisibleByDownstreamBuildAuth(@Nonnull 
>>> WorkflowJob upstreamPipeline, @Nonnull Queue.Task downstreamPipeline) {
>>> Authentication auth = 
>>> Tasks.getAuthenticationOf(downstreamPipeline);
>>> Authentication downstreamPipelineAuth;
>>> if (auth.equals(ACL.SYSTEM) && 
>>> !QueueItemAuthenticatorConfiguration.get().getAuthenticators().isEmpty()) {
>>> downstreamPipelineAuth = Jenkins.ANONYMOUS; // cf. 
>>> BuildTrigger
>>> } else {
>>> downstreamPipelineAuth = auth;
>>> }
>>> try (ACLContext ignored = ACL.as(downstreamPipelineAuth)) {
>>> WorkflowJob upstreamPipelineObtainedAsImpersonated = 
>>> getItemByFullName(upstreamPipeline.getFullName(), WorkflowJob.class);
>>> boolean result = upstreamPipelineObtainedAsImpersonated != 
>>> null;
>>> LOGGER.log(Level.FINE, 
>>> "isUpstreamBuildVisibleByDownstreamBuildAuth({0}, {1}): taskAuth: {2}, 
>>> downstreamPipelineAuth: {3}, upstreamPipelineObtainedAsImpersonated:{4}, 
>>> result: {5}",
>>> new Object[]{upstreamPipeline, downstreamPipeline, 
>>> auth, downstreamPipelineAuth, upstreamPipelineObtainedAsImpersonated, 
>>> result});
>>> return result;
>>> }
>>> }
>>
>>
>>
>> On Friday, August 2, 2019 at 1:31:49 AM UTC+2, drpm wrote:
>>>
>>> Hello,
>>>
>>> Thank you for your reply. 
>>>
>>> Yes I do have Jenkins Authorize Project 
>>> <https://plugins.jenkins.io/authorize-project>plugin. I tried running 
>>> it as a SYSTEM and user with admin privileges and still having the same 
>>> error. 
>>>
>>> *As SYSTEM user: *
>>>
>>>>
>>>> upstreamPipeline (, visibleByDownstreamBuildAuth: 
>>>> false),  downstreamPipeline (, 
>>>> visibleByUpstreamBuildAuth: true), upstreamBuildAuth: 
>>>> org.acegisecurity.providers.UsernamePasswordAuthenticationToken@1f: 
>>>> Username: SYSTEM; Password: [PROTECTED]; Authenticated: false; Details: 
>>>> null; Not granted any authorities
>>>> Skip triggering of  by  
>>>> #: downstreamVisibleByUpstreamBuildAuth: true, 
>>>> upstreamVisibleByDownstreamBuildAuth: false
>>>
>>>
>>>
>>> *As USER WITH PRIV:*
>>>
>>> upstreamPipeline (, visibleByDownstreamBuildAuth: 
>>>> false),  downstreamPipeline (, 
>>>> visibleByUpstreamBuildAuth: true), upstreamBuildAuth: 
>>>> org.acegisecurity.providers.UsernamePasswordAuthenticationToken@72da9556: 
>>>> Username: ; Password: [PROTECTED]; Authenticated: 
>>>> true; Details: null; Granted Authorities: authenticated
>>>> Skip triggering of  by  
>>>> #: downstre

Re: Jenkins Pipeline Maven Plugin - Always skipping downstream job

2019-08-02 Thread Cyrille Le Clerc
Can you please enable FINER 
on org.jenkinsci.plugins.pipeline.maven.service.PipelineTriggerService ? I 
am interested by the message of isUpstreamBuildVisibleByDownstreamBuildAuth

https://github.com/jenkinsci/pipeline-maven-plugin/blob/pipeline-maven-3.8.0/jenkins-plugin/src/main/java/org/jenkinsci/plugins/pipeline/maven/service/PipelineTriggerService.java#L332

public boolean isUpstreamBuildVisibleByDownstreamBuildAuth(@Nonnull 
> WorkflowJob upstreamPipeline, @Nonnull Queue.Task downstreamPipeline) {
> Authentication auth = 
> Tasks.getAuthenticationOf(downstreamPipeline);
> Authentication downstreamPipelineAuth;
> if (auth.equals(ACL.SYSTEM) && 
> !QueueItemAuthenticatorConfiguration.get().getAuthenticators().isEmpty()) {
> downstreamPipelineAuth = Jenkins.ANONYMOUS; // cf. BuildTrigger
> } else {
> downstreamPipelineAuth = auth;
> }
> try (ACLContext ignored = ACL.as(downstreamPipelineAuth)) {
> WorkflowJob upstreamPipelineObtainedAsImpersonated = 
> getItemByFullName(upstreamPipeline.getFullName(), WorkflowJob.class);
> boolean result = upstreamPipelineObtainedAsImpersonated != 
> null;
> LOGGER.log(Level.FINE, 
> "isUpstreamBuildVisibleByDownstreamBuildAuth({0}, {1}): taskAuth: {2}, 
> downstreamPipelineAuth: {3}, upstreamPipelineObtainedAsImpersonated:{4}, 
> result: {5}",
> new Object[]{upstreamPipeline, downstreamPipeline, 
> auth, downstreamPipelineAuth, upstreamPipelineObtainedAsImpersonated, 
> result});
> return result;
> }
> }



On Friday, August 2, 2019 at 1:31:49 AM UTC+2, drpm wrote:
>
> Hello,
>
> Thank you for your reply. 
>
> Yes I do have Jenkins Authorize Project 
> <https://plugins.jenkins.io/authorize-project>plugin. I tried running it 
> as a SYSTEM and user with admin privileges and still having the same error. 
>
> *As SYSTEM user: *
>
>>
>> upstreamPipeline (, visibleByDownstreamBuildAuth: 
>> false),  downstreamPipeline (, 
>> visibleByUpstreamBuildAuth: true), upstreamBuildAuth: 
>> org.acegisecurity.providers.UsernamePasswordAuthenticationToken@1f: 
>> Username: SYSTEM; Password: [PROTECTED]; Authenticated: false; Details: 
>> null; Not granted any authorities
>> Skip triggering of  by  #: 
>> downstreamVisibleByUpstreamBuildAuth: true, 
>> upstreamVisibleByDownstreamBuildAuth: false
>
>
>
> *As USER WITH PRIV:*
>
> upstreamPipeline (, visibleByDownstreamBuildAuth: false),  
>> downstreamPipeline (, visibleByUpstreamBuildAuth: 
>> true), upstreamBuildAuth: 
>> org.acegisecurity.providers.UsernamePasswordAuthenticationToken@72da9556: 
>> Username: ; Password: [PROTECTED]; Authenticated: 
>> true; Details: null; Granted Authorities: authenticated
>> Skip triggering of  by  #: 
>> downstreamVisibleByUpstreamBuildAuth: true, 
>> upstreamVisibleByDownstreamBuildAuth: false
>
>
> I also use this plugin: Role+Strategy+Plugin 
> <https://wiki.jenkins.io/display/JENKINS/Role+Strategy+Plugin>
>
> Do I need to create a special role? 
>
> - drpm
>
> On Friday, August 2, 2019 at 6:02:11 AM UTC+9, Cyrille Le Clerc wrote:
>>
>> Hello,
>>
>> Could you be using the Jenkins Authorize Project Plugin 
>> <https://plugins.jenkins.io/authorize-project> and impersonate your 
>> builds with a user different from SYSTEM? What is the "" displayed in 
>> the log message "upstreamPipeline... Username: "?
>>
>> When not using the  Jenkins Authorize Project Plugin 
>> <https://plugins.jenkins.io/authorize-project>, the user used to run the 
>> upstream pipelines is SYSTEM as we can see in the sample below
>>
>> upstreamPipeline (plugins/pipeline-maven-plugin/dependency-graph/my-jar, 
>>> visibleByDownstreamBuildAuth: true),  downstreamPipeline 
>>> (plugins/pipeline-maven-plugin/dependency-graph/my-war-multibranch/master, 
>>> visibleByUpstreamBuildAuth: true), *upstreamBuildAuth*: 
>>> org.acegisecurity.providers.UsernamePasswordAuthenticationToken@1f: 
>>> *Username: 
>>> SYSTEM*; Password: [PROTECTED]; Authenticated: false; Details: null; 
>>> Not granted any authorities
>>
>>
>> Cyrille
>>
>>
>> On Thursday, August 1, 2019 at 9:26:34 AM UTC+2, drpm wrote:
>>>
>>> I'm having an issue regarding Jenkins Pipeline Maven Plugin 
>>> (*https://wiki.jenkins.io/display/JENKINS/Pipeline+Maven+Plugin 
>>> <https://wiki.jenkins.io/display/JENKINS/Pipeline+Maven+Plugin>*). It 
>>> a

Re: Jenkins Pipeline Maven Plugin - Always skipping downstream job

2019-08-01 Thread Cyrille Le Clerc
Hello,

Could you be using the Jenkins Authorize Project Plugin 
 and impersonate your builds 
with a user different from SYSTEM? What is the "" displayed in the 
log message "upstreamPipeline... Username: "?

When not using the  Jenkins Authorize Project Plugin 
, the user used to run the 
upstream pipelines is SYSTEM as we can see in the sample below

upstreamPipeline (plugins/pipeline-maven-plugin/dependency-graph/my-jar, 
> visibleByDownstreamBuildAuth: true),  downstreamPipeline 
> (plugins/pipeline-maven-plugin/dependency-graph/my-war-multibranch/master, 
> visibleByUpstreamBuildAuth: true), *upstreamBuildAuth*: 
> org.acegisecurity.providers.UsernamePasswordAuthenticationToken@1f: 
> *Username: 
> SYSTEM*; Password: [PROTECTED]; Authenticated: false; Details: null; Not 
> granted any authorities


Cyrille


On Thursday, August 1, 2019 at 9:26:34 AM UTC+2, drpm wrote:
>
> I'm having an issue regarding Jenkins Pipeline Maven Plugin 
> (*https://wiki.jenkins.io/display/JENKINS/Pipeline+Maven+Plugin 
> *). It 
> always skips the downstream jobs even if "*Build whenever a SNAPSHOT 
> dependency is built*" is checked.
>
> Here's the FINER logs for Downstream listener(
> *org.jenkinsci.plugins.pipeline.maven.listeners.DownstreamPipelineTriggerRunListener*
> ):
>
> *upstreamPipeline (, visibleByDownstreamBuildAuth: false), 
>  downstreamPipeline (, visibleByUpstreamBuildAuth: 
> true), upstreamBuildAuth: 
> org.acegisecurity.providers.UsernamePasswordAuthenticationToken@1f: 
> Username: ; Password: [PROTECTED]; *
>
> *Skip triggering of  by  #: 
> downstreamVisibleByUpstreamBuildAuth: true, 
> upstreamVisibleByDownstreamBuildAuth: false*
>
> ---
>
> The value for *visibleByDownstreamBuildAuth* is always false. Any ideas 
> how to make that value true?
>
> Also Jenkins has this troubleshooting guide but my settings are already 
> correct. 
> *https://wiki.jenkins.io/display/JENKINS/Pipeline+Maven+Plugin#PipelineMavenPlugin-Mydownstreampipelinesdon'tgettriggeredevenifIuse%22BuildwheneveraSNAPSHOTdependencyisbuilt%22
>  
> *
>
> Thank you in advance. 
>

-- 
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 jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/3844ab1a-5d02-4338-bc3e-46aae255c384%40googlegroups.com.


Re: pipeline-maven-plugin 3.8 upgrade fails to load mysql driver

2019-07-15 Thread Cyrille Le Clerc
Thanks Dan.

Did you uninstall the "database-mysql" plugin when you performed your 
upgrade? I was expecting people who had installed the "database-mysql" to 
not need to install the "mysql-api" plugin. 

Maybe I misunderstood the classloader isolation of Jenkins plugins.

Cyrille



On Saturday, July 13, 2019 at 10:35:40 PM UTC+2, Dan Tran wrote:
>
>
> The change suggests to install mysql-api plugin.  It works
>
> Thanks
>
> -D
> On Saturday, July 13, 2019 at 1:30:11 PM UTC-7, Dan Tran wrote:
>>
>> looks like my issue related to this change 
>> https://github.com/jenkinsci/pipeline-maven-plugin/commit/9a673ee9cd4ee978a9f8b4bf830fdccfde40706b
>>
>> will dig further before file a Jira bug
>>
>> Thanks
>>
>> -D
>>
>>>


-- 
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 jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/90f4871c-544f-4f56-93db-c723953a735c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: withMaven Artifacts URL

2019-05-30 Thread Cyrille Le Clerc
For the record, this FAQ section: 
https://wiki.jenkins.io/display/JENKINS/Pipeline+Maven+Plugin#PipelineMavenPlugin-HowtouseMavenbuilddataingeneratedemails

On Monday, April 22, 2019 at 12:24:06 PM UTC+2, Cyrille Le Clerc wrote:
>
> Can you clarify what you mean by a "variable", where do you want to use 
> such data? In pipeline groovy code?
> Do you have examples of other pipeline steps that expose data you like to 
> consume?
>
> Le ven. 19 avr. 2019 à 22:05, Harsh Shah  a écrit :
>
>> Any update on the API to get the published artifacts url into a variable? 
>> I want to use the generated URL in mail description.
>>
>> This topic has a similar need, 
>> https://groups.google.com/forum/#!topic/jenkinsci-users/sPAYLh1W1cM
>>
>> Thanks.
>>
>> On Monday, August 13, 2018 at 6:03:19 PM UTC-7, Bernardo Vale wrote:
>>>
>>> Hey guys.
>>>
>>> I'm looking for a way to programmatically determine the URL of an 
>>> artifact generated by withMaven (Maven Pipeline Plugin).
>>>
>>> When I deploy an artifact using withMaven, it generates the URL of each 
>>> artifact inside: $JENKINS_SERVER/path/to/job/8/maven
>>>
>>> I'd like to programmatically consume this information.
>>>
>> -- 
>> You received this message because you are subscribed to a topic in the 
>> Google Groups "Jenkins Users" group.
>> To unsubscribe from this topic, visit 
>> https://groups.google.com/d/topic/jenkinsci-users/TtJkNCzMyyk/unsubscribe
>> .
>> To unsubscribe from this group and all its topics, send an email to 
>> jenkinsci-users+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/jenkinsci-users/81cedacd-441c-4f8e-86d2-450693111cad%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/jenkinsci-users/81cedacd-441c-4f8e-86d2-450693111cad%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>

-- 
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 jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/18c17223-6227-4fe4-b9ef-dbee99f063d4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Add Publisher Maven artifacts to mail template

2019-05-30 Thread Cyrille Le Clerc
For the record, this FAQ section: 
https://wiki.jenkins.io/display/JENKINS/Pipeline+Maven+Plugin#PipelineMavenPlugin-HowtouseMavenbuilddataingeneratedemails

On Saturday, April 27, 2019 at 1:59:53 AM UTC+2, Harsh Shah wrote:
>
> Hi, Cyrille
>
>   So this is how I do it.
>
>
> pipeline side invoke the method
>  
> env.DEPLOYEDARTIFACTS = getDeployedArtifacts()
>
> @NonCPS
> def getDeployedArtifacts() {
> def deployed = ''
> Collection 
> generatedArtifacts = 
> currentBuild.rawBuild.getAction(org.jenkinsci.plugins.pipeline.maven.publishers.MavenReport.class).getGeneratedArtifacts();
> for (org.jenkinsci.plugins.pipeline.maven.MavenArtifact 
> generatedArtifact:generatedArtifacts) {
> if (generatedArtifact.isDeployed()) {
>
> deployed= deployed.concat(generatedArtifact.getUrl())
> deployed = deployed.concat("===")
> deployed = 
> deployed.concat(generatedArtifact.getShortDescription())
> deployed = deployed.concat(",") 
> }
>
> }
> return deployed
> }
>
>
>
> In EXT-MAIL-STANDARD-TEMPLATE 
>
> 
> 
>  value="${it.getAction('org.jenkinsci.plugins.workflow.cps.EnvActionImpl').getOverriddenEnvironment()}"
>  
> />
> Deployed Artifacts
>   value="${mbuilds.get('DEPLOYEDArtifacts')}" />
>
>
>  items="${generatedArtifacts.split(',')}" >
>         
>  
>   
>   
> 
> ${artifact[1]}
>   
>   
>
>  
>  
>
>  
>
>
>
>  
>
>
> On Monday, April 22, 2019 at 3:22:34 AM UTC-7, Cyrille Le Clerc wrote:
>>
>> Thanks Harsh,
>>
>> Could you please share with us an example of using maven pipeline details 
>> in email generated by the email ext plug-in that I would add to the 
>> documentation?
>>
>> Le lun. 22 avr. 2019 à 08:49, Harsh Shah  a écrit :
>>
>>> Collection 
>>> generatedArtifacts = 
>>> currentBuild.rawBuild.getAction(org.jenkinsci.plugins.pipeline.maven.publishers.MavenReport.class).getGeneratedArtifacts();
>>> for 
>>> (org.jenkinsci.plugins.pipeline.maven.MavenArtifact 
>>> generatedArtifact:generatedArtifacts) {
>>> if (generatedArtifact.isDeployed()) {
>>> println("" + generatedArtifact.getShortDescription() 
>>> + "");
>>> } else {
>>> 
>>> println(generatedArtifact.getShortDescription());
>>> }
>>> }
>>>
>>> On Sunday, April 21, 2019 at 11:48:03 PM UTC-7, Harsh Shah wrote:
>>>>
>>>> Hi,
>>>>   Thanks, this works.
>>>>
>>>> -Harsh
>>>>
>>>> On Sunday, April 21, 2019 at 9:15:50 AM UTC-7, Cyrille Le Clerc wrote:
>>>>>
>>>>> Hello Harsh,
>>>>>
>>>>>
>>>>> This seems to be possible but I have not tried. It should look like:
>>>>>
>>>>> Collection 
>>>>> generatedArtifacts = build.getAction(org.jenkinsci.plugins.pipeline.
>>>>> maven.publishers.MavenReport.class).getGeneratedArtifacts();
>>>>>
>>>>> for (MavenArtifact generatedArtifact:generatedArtifacts) {
>>>>> if (generatedArtifact.isDeployed()) {
>>>>> System.out.println("" + generatedArtifact.getShortDescription() + "");
>>>>> } else {
>>>>> System.out.println(generatedArtifact.getShortDescription());
>>>>> }
>>>>> }
>>>>>
>>>>>
>>>>> See source code 
>>>>> https://github.com/jenkinsci/pipeline-maven-plugin/blob/pipeline-maven-3.6.9/jenkins-plugin/src/main/java/org/jenkinsci/plugins/pipeline/maven/MavenArtifact.java
>>>>>
>>>>> Cyrille
>>>>>
>>>>> On Friday, April 19, 2019 at 7:06:01 PM UTC+2, Harsh Shah wrote:
>>>>>>
>>>>>> The template is a pretty standard template like this 
>>>>>> https://wiki.jenkins.io/download/attachments/3604514/jenkins-matrix-email-html.template?version=1&modificationDate=1332562186000&api=v2
>>>>>> I am trying to get maven artifacts urls
>>>>>>
>>>>&

Re: What is causing use of wrong settings.xml in Maven

2019-05-30 Thread Cyrille Le Clerc
Hello Lee,

Thank you for using the Pipeline Maven integration.

First, can I recommend you to not define simultaneously the settings file 
as a "withMaven" parameter and in the "mvn" command invocation.
If it's the same file as your example suggests it, you don't need to 
specify it in the "mvn" command. 
If you need to compose two Maven settings file, you could use a "global 
settings file" and a "local settings file" to avoid any conflict?

Second, can you explain us why you have to pass a settings file path? is it 
because dev team can add a Maven settings file in their application code 
repository? is it because you copy this Maven settings file on the build 
agents? I would greatly recommend to manage all the Maven settings files 
through the Jenkins Configuration File Provider. You can define Maven 
settings file globally or at the folder level.

Third, to better understand the effective Maven settings, can you invoke 
"mvn ... help:effective-settings" in the "withMaven" block not forgetting 
to pass the same parameters as what you pass in your "mvn clean package"? 
See 
https://maven.apache.org/plugins/maven-help-plugin/effective-settings-mojo.html

Last but not least, instead of specifying the Maven settings file in the 
"withMaven" step (e.g. "withMaven(mavenSettingsConfig: 
'some-maven-settings')"), you can define default Maven settings at the 
global level or at the folder level. Please see 
https://wiki.jenkins.io/display/JENKINS/Pipeline+Maven+Plugin#PipelineMavenPlugin-MavenSettingsSupport

Cyrille


On Thursday, May 30, 2019 at 9:52:02 PM UTC+2, Lee Meador wrote:
>
> I'm pretty sure some Jenkins plugin is causing this. Using 2.164 :
>
> I have a scripted pipeline build and the maven call is of this form:
>
> withMaven(..., mavenSettingsFilePath: settings1.xml, ...) {
> sh 'mvn -X --settings settings1.xml clean package'
> }
>
> (If I leave out the --settings, it does exactly the same thing)
>
> The file settings1.xml has this in it to tell where to get maven 
> dependencies. I printed it in the console log with a "sh 'cat 
> settings1.xml' "
>
> *14:08:59* *14:08:59* *14:08:59* 
> nexus*14:08:59* 
> !artifactory-snapshots,**14:08:59* 
> artifactory mirrored central repos.*14:08:59* 
> https://example.com/artifactory/OT-public/*14:08:59* 
> *14:08:59* 
>
>
> These messages appear in the log (using -X). I've snipped the workspace 
> path out AND verified that withMaven seems to have copied my settings1.xml 
> file to a working folder.
>
> *14:09:00* [DEBUG] Reading global settings from 
> /usr/local/apache-maven-3.3.9/conf/settings.xml*14:09:00* [DEBUG] Reading 
> user settings from <..workspace..>@tmp/withMaven430960bf/settings.xml
>
> 
>
> *14:09:00* [INFO] Scanning for projects...*14:09:00* [DEBUG] Using 
> transporter WagonTransporter with priority -1.0 for 
> https://example.com/artifactory/maven-public/
>
> *14:09:00* [DEBUG] Using connector BasicRepositoryConnector with priority 0.0 
> for https://example.com/artifactory/maven-public/ with username=, 
> password=14:09:00* [INFO] Downloading: 
> https://example.com/artifactory/maven-public/org/springframework/boot/spring-boot-starter-parent/2.0.2.RELEASE/spring-boot-starter-parent-2.0.2.RELEASE.pom
>
> All the logs show it loading things from "maven-public" which, you will note, 
> is not the repository in my settings1.xml file.
>
>
> Based on the message about the WagonTransporter, can someone suggest a plugin 
> that may be overriding my settings1.xml configurations?
>
>
> Thanks
>
>
> -- Lee Meador
> Sent from gmail. My real email address is lee AT leemeador.com
>

-- 
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 jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/d885a02f-09ff-4842-9df8-753133ef941a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: withMaven Artifacts URL

2019-04-22 Thread Cyrille Le Clerc
Can you clarify what you mean by a "variable", where do you want to use
such data? In pipeline groovy code?
Do you have examples of other pipeline steps that expose data you like to
consume?

Le ven. 19 avr. 2019 à 22:05, Harsh Shah  a écrit :

> Any update on the API to get the published artifacts url into a variable?
> I want to use the generated URL in mail description.
>
> This topic has a similar need,
> https://groups.google.com/forum/#!topic/jenkinsci-users/sPAYLh1W1cM
>
> Thanks.
>
> On Monday, August 13, 2018 at 6:03:19 PM UTC-7, Bernardo Vale wrote:
>>
>> Hey guys.
>>
>> I'm looking for a way to programmatically determine the URL of an
>> artifact generated by withMaven (Maven Pipeline Plugin).
>>
>> When I deploy an artifact using withMaven, it generates the URL of each
>> artifact inside: $JENKINS_SERVER/path/to/job/8/maven
>>
>> I'd like to programmatically consume this information.
>>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "Jenkins Users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/jenkinsci-users/TtJkNCzMyyk/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> jenkinsci-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/jenkinsci-users/81cedacd-441c-4f8e-86d2-450693111cad%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/CADA0CVzSMiNP6n0fkdsduh4%3Dwu2-gAmhVwhrzMQh7PkTxFws7g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Add Publisher Maven artifacts to mail template

2019-04-22 Thread Cyrille Le Clerc
Thanks Harsh,

Could you please share with us an example of using maven pipeline details
in email generated by the email ext plug-in that I would add to the
documentation?

Le lun. 22 avr. 2019 à 08:49, Harsh Shah  a écrit :

> Collection
> generatedArtifacts =
> currentBuild.rawBuild.getAction(org.jenkinsci.plugins.pipeline.maven.publishers.MavenReport.class).getGeneratedArtifacts();
> for
> (org.jenkinsci.plugins.pipeline.maven.MavenArtifact
> generatedArtifact:generatedArtifacts) {
> if (generatedArtifact.isDeployed()) {
> println("" + generatedArtifact.getShortDescription()
> + "");
> } else {
>
> println(generatedArtifact.getShortDescription());
> }
> }
>
> On Sunday, April 21, 2019 at 11:48:03 PM UTC-7, Harsh Shah wrote:
>>
>> Hi,
>>   Thanks, this works.
>>
>> -Harsh
>>
>> On Sunday, April 21, 2019 at 9:15:50 AM UTC-7, Cyrille Le Clerc wrote:
>>>
>>> Hello Harsh,
>>>
>>>
>>> This seems to be possible but I have not tried. It should look like:
>>>
>>> Collection
>>> generatedArtifacts = build.getAction(org.jenkinsci.plugins.pipeline.
>>> maven.publishers.MavenReport.class).getGeneratedArtifacts();
>>>
>>> for (MavenArtifact generatedArtifact:generatedArtifacts) {
>>> if (generatedArtifact.isDeployed()) {
>>> System.out.println("" + generatedArtifact.getShortDescription() + "");
>>> } else {
>>> System.out.println(generatedArtifact.getShortDescription());
>>> }
>>> }
>>>
>>>
>>> See source code
>>> https://github.com/jenkinsci/pipeline-maven-plugin/blob/pipeline-maven-3.6.9/jenkins-plugin/src/main/java/org/jenkinsci/plugins/pipeline/maven/MavenArtifact.java
>>>
>>> Cyrille
>>>
>>> On Friday, April 19, 2019 at 7:06:01 PM UTC+2, Harsh Shah wrote:
>>>>
>>>> The template is a pretty standard template like this
>>>> https://wiki.jenkins.io/download/attachments/3604514/jenkins-matrix-email-html.template?version=1&modificationDate=1332562186000&api=v2
>>>> I am trying to get maven artifacts urls
>>>>
>>>> 
>>>> 
>>>> 
>>>>   
>>>> Build Artifacts
>>>> 
>>>>   ${m.key.displayName}
>>>>   
>>>> 
>>>> 
>>>>   
>>>> 
>>>>   
>>>> >>> href="${rooturl}${mvnbld.url}artifact/${f}">${f}
>>>>   
>>>> 
>>>>   
>>>> 
>>>>   
>>>> 
>>>> 
>>>>   
>>>> 
>>>>
>>>>
>>>>
>>>> On Friday, April 19, 2019 at 9:30:49 AM UTC-7, Cyrille Le Clerc wrote:
>>>>>
>>>>> do you have examples of integrations of the email ext plugin with
>>>>> other plugins?
>>>>> Is the integration based on environment variables?
>>>>>
>>>>> Cyrille
>>>>>
>>>>> On Friday, April 19, 2019 at 2:15:11 AM UTC+2, Harsh Shah wrote:
>>>>>>
>>>>>> Hi,
>>>>>>   We have been using pipeline maven plugin and maven artifact
>>>>>> publisher to display deployed artifacts by the build.
>>>>>>
>>>>>>   We also use ext-email plugin with a template to provide
>>>>>> notifications.
>>>>>>
>>>>>> How can I get the published maven artifacts from maven artifact
>>>>>> publisher in my email description?
>>>>>>
>>>>>>
>>>>>> Thanks,
>>>>>> -Harsh
>>>>>>
>>>>> --
> You received this message because you are subscribed to a topic in the
> Google Groups "Jenkins Users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/jenkinsci-users/sPAYLh1W1cM/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> jenkinsci-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/jenkinsci-users/f4ea394b-824e-4ba7-8664-46b205bb523d%40googlegroups.com
> <https://groups.google.com/d/msgid/jenkinsci-users/f4ea394b-824e-4ba7-8664-46b205bb523d%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/CADA0CVygkziEzy3Y82CKd95q5AU3BgDLfYghTrMe%2B1%3DMq8cz7A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Add Publisher Maven artifacts to mail template

2019-04-21 Thread Cyrille Le Clerc
Hello Harsh,


This seems to be possible but I have not tried. It should look like:

Collection 
generatedArtifacts = build.getAction(org.jenkinsci.plugins.pipeline.maven.
publishers.MavenReport.class).getGeneratedArtifacts();

for (MavenArtifact generatedArtifact:generatedArtifacts) {
if (generatedArtifact.isDeployed()) {
System.out.println("" 
+ generatedArtifact.getShortDescription() + "");
} else {
System.out.println(generatedArtifact.getShortDescription());
}
}


See source code 
https://github.com/jenkinsci/pipeline-maven-plugin/blob/pipeline-maven-3.6.9/jenkins-plugin/src/main/java/org/jenkinsci/plugins/pipeline/maven/MavenArtifact.java

Cyrille

On Friday, April 19, 2019 at 7:06:01 PM UTC+2, Harsh Shah wrote:
>
> The template is a pretty standard template like this 
> https://wiki.jenkins.io/download/attachments/3604514/jenkins-matrix-email-html.template?version=1&modificationDate=1332562186000&api=v2
> I am trying to get maven artifacts urls
>
> 
> 
> 
>   
> Build Artifacts
> 
>   ${m.key.displayName}
>   
> 
> 
>   
> 
>   
> ${f}
>   
> 
>   
> 
>   
> 
> 
>   
> 
>
>
>
> On Friday, April 19, 2019 at 9:30:49 AM UTC-7, Cyrille Le Clerc wrote:
>>
>> do you have examples of integrations of the email ext plugin with other 
>> plugins?
>> Is the integration based on environment variables?
>>
>> Cyrille
>>
>> On Friday, April 19, 2019 at 2:15:11 AM UTC+2, Harsh Shah wrote:
>>>
>>> Hi,
>>>   We have been using pipeline maven plugin and maven artifact publisher 
>>> to display deployed artifacts by the build. 
>>>
>>>   We also use ext-email plugin with a template to provide notifications. 
>>>
>>> How can I get the published maven artifacts from maven artifact 
>>> publisher in my email description?
>>>
>>>  
>>> Thanks,
>>> -Harsh
>>>
>>

-- 
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 jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/6ce639f4-dec4-4225-8133-57457bbec256%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Add Publisher Maven artifacts to mail template

2019-04-19 Thread Cyrille Le Clerc
do you have examples of integrations of the email ext plugin with other 
plugins?
Is the integration based on environment variables?

Cyrille

On Friday, April 19, 2019 at 2:15:11 AM UTC+2, Harsh Shah wrote:
>
> Hi,
>   We have been using pipeline maven plugin and maven artifact publisher to 
> display deployed artifacts by the build. 
>
>   We also use ext-email plugin with a template to provide notifications. 
>
> How can I get the published maven artifacts from maven artifact publisher 
> in my email description?
>
>  
> Thanks,
> -Harsh
>

-- 
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 jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/a9beb712-d828-49d2-b9b7-829e86f3551e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Pipeline-Maven-Plugin when current build status is UNSTABLE

2019-04-17 Thread Cyrille Le Clerc
@Benjamin can you please create a jira issue, it's easier for us to follow 
up.

On Monday, March 25, 2019 at 9:40:57 AM UTC+1, Benjamin Tocquec wrote:
>
> Not really closed !
> For a new project, it won't be added to downstream list of its parent 
> project unless its status is STABLE.
>
> So in my case, when a new project compile but Sonar gate fails, it's 
> marked as UNSTABLE and not present in downstream list of its parent.
>
> Can someone help me please?
>
>
> Le jeudi 21 mars 2019 20:37:33 UTC+1, Benjamin Tocquec a écrit :
>>
>> Finally found the mistake/solution: my Sonar Stage was in a separated 
>> node. Groupingg every stages in same node solved my issue.
>>
>> Thanks
>>
>> Le jeudi 21 mars 2019 18:59:38 UTC+1, Benjamin Tocquec a écrit :
>>>
>>> Hi,
>>>
>>> Here is my context.
>>> I have a pipeline with main steps:
>>>
>>>- mvn clean deploy
>>>- mvn test
>>>- sonar quality gate
>>>
>>> I choose to set currentBuild.result = 'UNSTABLE' if last step (quality 
>>> gate from Sonar) is not OK.
>>> I want my dependencies to build automatically downstream projects when 
>>> SNAPSHOT.
>>>
>>> Everything works well when quality gate is OK (means the job is SUCCESS):
>>> If my newly SUCCESSed project A contains SNAPSHOTed dependencies B, I 
>>> can see on "Downstream Jobs" of this dependency B the newly build project.
>>> So, when I build this dependency B, on finished, job from project A is 
>>> launched.
>>>
>>> BUT
>>>
>>> If my job from project A is UNSTABLE (by choice, forced in my pipeline), 
>>> it will be no more referenced as a downstream Job from dependency B.
>>> (so building B will no more trigger A)
>>> I'd like this relationship not to be lost :/
>>>
>>> Any help appreciated !
>>> Thanks!
>>>
>>

-- 
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 jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/38eefc06-9f8b-4643-b780-c2c805bfdc6b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Wrong output on .../job/*/maven

2019-04-17 Thread Cyrille Le Clerc
Adding a comment to not forget that this thread is not done

On Friday, March 22, 2019 at 10:01:47 AM UTC+1, Aaron Digulla wrote:
>
>
>
> On Thursday, March 21, 2019 at 4:20:54 PM UTC+1, Cyrille Le Clerc wrote:
>>
>>
>> >> Please see new FAQ entry 
>> https://wiki.jenkins.io/display/JENKINS/Pipeline+Maven+Plugin#PipelineMavenPlugin-HowcanItroubleshootproblemsoftriggerofdownstreampipelines
>>
>> I have improved the FAQ entry based on your feedback, can you please have 
>> a look?
>>
>
> Much better. Only the last sentence looks cut off: "Troubleshooting 
> details are added".
>
> Did you mean "You will find details to troubleshoot the issue below that 
> line"?
>  
>
>>
>> >  I had to add a "Pipeline Graph Publisher" with the dropdown "Add 
>> Publisher Options". In there, I could switch the option "Maven lifecycle 
>> phase threshold" from "deploy" to "install".
>>
>> Good that you figured this out. The User Experience is not great but I 
>> didn't find better so far.
>>
>
> How about printing "downstream not triggered because project used "mvn 
> install" and the lower limit for triggering is "mvn deploy" + link to 
> config where you can change that or a help page?
>  
>
>>
>> > That leaves the weird behavior of the artifactsPublisher and my 
>> comments about the new FAQ item.
>>
>> There is a non intuitive UX on the Pipeline Maven Plugin here: the 
>> artifactPublisher is just about "fingerprinting" and "archiving" the 
>> generated artifacts, it is NOT about updating the dependency graph that 
>> tracks (in a database) the produced and consumed artifacts. The 
>> "pipelineGraphPublisher" was introduced way after the "artifactsPublisher" 
>> (~6/12 months after).
>> I suspect that the "pipelineGraphPublisher" is invoked twice in your 
>> pipeline.
>>
>
> I searched for "pipelineGraphPublisher" which got me no hits. Then "graph" 
> which produces exactly one hit:
>
> [withMaven] Publishers: Pipeline Graph Publisher: 12 ms, Generated Artifacts 
> Publisher: 31 ms, Junit Publisher: 52 ms, Dependencies Fingerprint Publisher: 
> 4 ms, Jacoco Publisher: 12 ms, Open Task Scanner Publisher: 14 ms
>
>  
> Seems like that plugin is a quiet one :-) Any hints?
>
> > That triggers the downstream builds of feature branches. Now, I have to 
>> figure out how to share the artifacts. See my post "Chained builds" for my 
>> thoughts on that.
>>
>> I'll have a look, it is a difficult problem to solve. I didn't yet deep 
>> dive in https://maven.apache.org/maven-ci-friendly.html that seem to be 
>> related to the problem you want to solve.
>>
>
> I read through the document and it seems an attempt to solve something but 
> after reading it, I'm unsure what exactly.
>
> Maybe what they try is to give the build result of each branch a unique 
> version? So you could deploy all of them to Nexus and the next build would 
> pick the right one to use.
>
> The use of the Flatten Maven Plugin worries me a bit but I think this is 
> necessary because Maven doesn't support variables in the project.version 
> property (for good reason). But some things like removing 
> dependencyManagement elements seems completely wrong to me.
>
> Still, the idea to solve the "Maven doesn't support branches" by using one 
> version per branch sounds promising. Does Jenkins take the version into 
> account when building downstream projects i.e. if the downstream project 
> has a dependency on 2.x-SNAPSHOT, it will not get triggered when I build 
> 2.x-FOO-SNAPSHOT?
>
> Regards,
>
> -- 
> Aaron Digulla
>
>

-- 
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 jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/3f679283-2510-4446-970a-83187d0f0b19%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [withMaven] maven linker publisher stop working after upgrade to latest LTS 2.164.1

2019-04-17 Thread Cyrille Le Clerc
Thanks Dan.

Did you see the recommendation to use MySQL for production grade usage of 
Pipeline Maven integration instead of the embedded H2 database?
See 
https://wiki.jenkins.io/display/JENKINS/Pipeline+Maven+Plugin#PipelineMavenPlugin-UsingaMySQLDatabase(since3.6.0)

Cyrille

On Wednesday, March 27, 2019 at 1:43:44 AM UTC+1, Dan Tran wrote:
>
> false alarm,  just figured out. After upgrade,  H2 DB was corrupted.  
>  ended up to wipe its storage and restart
>
> -D
>
> On Tuesday, March 26, 2019 at 5:22:01 PM UTC-7, slide wrote:
>>
>> Can you give more information about the failure?
>>
>> On Tue, Mar 26, 2019 at 5:03 PM Dan Tran  wrote:
>>
>>>
>>> Hello 
>>>
>>> Anyone facing the same issue? downgrade pipeline maven plugin to 3.6.5 
>>> still not helping
>>>
>>> Thanks
>>>
>>> -D
>>>
>>> -- 
>>> 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 jenkinsci-use...@googlegroups.com.
>>> To view this discussion on the web visit 
>>> https://groups.google.com/d/msgid/jenkinsci-users/21f2d93e-4c42-415d-ac23-1c17d790b4d7%40googlegroups.com
>>>  
>>> 
>>> .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>
>> -- 
>> Website: http://earl-of-code.com
>>
>

-- 
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 jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/90aff67d-ac07-44a8-b053-ce35df2c1305%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: How does "Build whenever a SNAPSHOT dependency is built" work?

2019-04-15 Thread Cyrille Le Clerc
Hello Aaron,

If all your downstream branches have a dependency on the same upstream 
snapshot version, then yes, all downstream pipelines will be triggered, we 
don't differentiate on the branch identifier.

Did you expect a different behaviour? Wouldn't all the branches of the 
downstream job deserve to be triggered?

Cyrille



On Wednesday, April 10, 2019 at 1:15:26 PM UTC+2, Aaron Digulla wrote:
>
> Hello,
>
> Is there documentation how this feature works?
>
> I'm especially interested how it behaves when jobA builds a branch X for 
> project A and project B has a dependency on A. Both A and B are 
> multi-branch pipeline projects.
>
> Will that trigger a build of branch X of B or "build all branches of B"?
>
> Regards,
>
> Aaron Digulla
>

-- 
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 jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/0bf0aa57-c49d-4273-9963-dd04cfdd26de%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Wrong output on .../job/*/maven

2019-03-21 Thread Cyrille Le Clerc

>> Please see new FAQ entry 
https://wiki.jenkins.io/display/JENKINS/Pipeline+Maven+Plugin#PipelineMavenPlugin-HowcanItroubleshootproblemsoftriggerofdownstreampipelines

I have improved the FAQ entry based on your feedback, can you please have a 
look?

>  I had to add a "Pipeline Graph Publisher" with the dropdown "Add 
Publisher Options". In there, I could switch the option "Maven lifecycle 
phase threshold" from "deploy" to "install".

Good that you figured this out. The User Experience is not great but I 
didn't find better so far.

> That leaves the weird behavior of the artifactsPublisher and my comments 
about the new FAQ item.

There is a non intuitive UX on the Pipeline Maven Plugin here: the 
artifactPublisher is just about "fingerprinting" and "archiving" the 
generated artifacts, it is NOT about updating the dependency graph that 
tracks (in a database) the produced and consumed artifacts. The 
"pipelineGraphPublisher" was introduced way after the "artifactsPublisher" 
(~6/12 months after).
I suspect that the "pipelineGraphPublisher" is invoked twice in your 
pipeline.

> That triggers the downstream builds of feature branches. Now, I have to 
figure out how to share the artifacts. See my post "Chained builds" for my 
thoughts on that.

I'll have a look, it is a difficult problem to solve. I didn't yet deep 
dive in https://maven.apache.org/maven-ci-friendly.html that seem to be 
related to the problem you want to solve.

On Tuesday, March 19, 2019 at 3:20:06 PM UTC, Aaron Digulla wrote:
>
> Hi Cyrille,
>
> I could fix one of my problems in the mean time: To get the downstream 
> build working, I had to do the following:
>
> In "Manage Jenkins" / "Global Tool Configuration", I had to add a 
> "Pipeline Graph Publisher" with the dropdown "Add Publisher Options". In 
> there, I could switch the option "Maven lifecycle phase threshold" from 
> "deploy" to "install".
>
> That triggers the downstream builds of feature branches. Now, I have to 
> figure out how to share the artifacts. See my post "Chained builds" for my 
> thoughts on that.
>
> That leaves the weird behavior of the artifactsPublisher and my comments 
> about the new FAQ item.
>

 

>
> Thanks a lot,
>
> Aaron Digulla
>
>

-- 
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 jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/7836f6a6-8468-4645-a395-e7d32b64a66b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Wrong output on .../job/*/maven

2019-03-18 Thread Cyrille Le Clerc
Hi Aaron,

- Why do I sometimes get duplicate artifacts? They are not duplicated on 
> disk. In the console log, I just see a single invocation of 
> artifactsPublisher but sometimes, it reports the same artifact several 
> times.


Can you share the Jenkinsfile and the logs of your build? Usually artifact 
are displayed several time because "mvn package" or more than "package" 
("install" or "deploy")  is called several times in the build (e.g. 
invoking "mvn test" then "mvn deploy")
 

> - Why isn't C listed as "Downstream Job" of B?


Can you please share screenshots of the "/maven" tab of both job "B" and 
"C"?
By default, downstream pipeline triggers only work when a pipeline 
is"success" or "unstable" and when the "mvn" goal is "deploy". This means 
that by default, "mvn package" or "mvn install" would not trigger a 
downstram pipeline.
 

> - How can I collect more information to debug this?


Please see new FAQ entry 
https://wiki.jenkins.io/display/JENKINS/Pipeline+Maven+Plugin#PipelineMavenPlugin-HowcanItroubleshootproblemsoftriggerofdownstreampipelines
 

On Monday, March 18, 2019 at 3:15:26 PM UTC, Aaron Digulla wrote:
>
> I have three projects in my example, A, B and C.
>
> A is built on another Jenkins PROD. It's deployed to Nexus.
>
> B depends on A. It's built on Jenkins TEST.
>
> C depends on B. It's also built on Jenkins TEST.
>
> All three projects have a SNAPSHOT version.
>
> The web page .../job/*/maven of B shows me:
>
> - All artifacts of B twice (*.jar, *.jar, *-sources.jar, *-sources.jar, 
> *-test-sources.jar, *-test-sources.jar, *.pom, *.pom, *-tests.jar, 
> *-tests.jar)
> - No "Upstream Builds"
> - No "Downstream Jobs"
> - A is listed as dependency
>
> I'd expect each artifact of B once and C as downstream job. Not sure about 
> dependencies but seeing A here would be nice even though it's built on 
> another Jenkins.
>
> The web page .../job/*/maven of C shows me:
>
> - Just some duplicate artifacts. This is a multi-module build. I'm seeing 
> the root POM twice, everything else just once.
> - No "Upstream Builds"
> - No "Downstream Jobs"
> - A and B are listed as dependencies.
>
> As far as I can tell, the two jobs use the same Jenkins Pipeline. They are 
> both of type "Multibranch Pipeline".
>
> B gets deployed to Nexus when I build the "master" and release branches 
> but not for feature branches. C only gets deployed to Nexus when it's a 
> release branch.
>
> I'm admin on Jenkins TEST, so I'm pretty sure it's not a ITEM.Read 
> permission issue.
>
> There is no config option "Build whenever a SNAPSHOT dependency is built" 
> for the jobs B or C. I can see the option when I click "View Configuration" 
> in .../job/*/master/configure
>
> Questions:
>
> - Why do I sometimes get duplicate artifacts? They are not duplicated on 
> disk. In the console log, I just see a single invocation of 
> artifactsPublisher but sometimes, it reports the same artifact several 
> times.
> - Why isn't C listed as "Downstream Job" of B?
> - How can I collect more information to debug this?
>
> Regards,
>
> -- 
> Aaron Digulla
>

-- 
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 jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/b83b080e-eac7-417b-acdc-74319c4aa9a0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Security - Pipeline parameterized credentials can be reused by other users

2019-03-17 Thread Cyrille Le Clerc
@ivan I am very interested in this topic and I get a 404 on your first 
link. Can you please verify the URL and maybe share a "non mobile" URL.

On Saturday, March 16, 2019 at 4:48:12 PM UTC, Ivan Fernandez Calvo wrote:
>
> By using 
> https://wiki.jenkins.io/plugins/servlet/mobile?contentId=102662618#content/view/10266261
>  
> and removing permissions to configure jobs, maybe build also and allow only 
> to trigger builds to some people or manage it with comments from GitHub 
> (see 
> https://wiki.jenkins.io/plugins/servlet/mobile?contentId=37749162#content/view/37749162)
>  
> also on pipeline multibranch projects you ha be options to only trust on 
> the jenkinsfile from the master branch 

-- 
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 jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/e5f5fe3b-35a1-44cd-a078-98c463ccc4df%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: How can we achieve the same effect as Jenkins 1's "Deploy artifacts to Maven repository" with Jenkins 2's pipelines?

2019-01-18 Thread Cyrille Le Clerc
Hello Aaron, thanks David

As David said, the "Deploy artifacts to Maven repository" feature of the 
Maven Job type does not exist "as is" in the Pipeline Maven integration.

The recommended solution is to use the "-DdeployAtEnd=true" feature of 
Maven. See 
https://maven.apache.org/plugins/maven-deploy-plugin/deploy-mojo.html#deployAtEnd
 
.

Can you please describe more your need. Is it one of

   - Prevent partial upload of maven artifacts when a multi module project 
   fails
   - Introduce intermediate build steps between the completion of "mvn 
   verify" and the upload of the artifacts (the "deploy" part of the maven 
   build)
   - Have retires if the artifact repository is unvailable
   - Other

Cyrille




On Thursday, January 17, 2019 at 6:23:40 PM UTC+1, David Karlsen wrote:
>
> I use the option deployAtEnd in the maven plugin to achieve this 
>
> Den tor. 17. jan. 2019, 16:59 skrev Cyrille Le Clerc <
> clec...@cloudbees.com >:
>
>> Hello AAron,
>>
>> This capability is niot av
>>
>> On Wednesday, January 16, 2019 at 5:16:22 PM UTC+1, Aaron Digulla wrote:
>>>
>>> Hello,
>>>
>>> For releases, I'd like to build and test all Maven modules and after the 
>>> build, deploy everything at once (otherwise, someone has to waste time to 
>>> clean up the mess in Nexus).
>>>
>>> In Jenkins 1, this was simple: Build with "mvn clean install" and add a 
>>> post-build job "Deploy artifacts to Maven repository".
>>>
>>> Jenkins 2 still maintains a list of all artifacts which need to be 
>>> deployed but I couldn't find the out how to recreate the old post-build job.
>>>
>>> How do I do that?
>>>
>>> Regards,
>>>
>> -- 
>> 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 jenkinsci-use...@googlegroups.com .
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/jenkinsci-users/8813b207-d8f5-4718-9401-a130b475899b%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/jenkinsci-users/8813b207-d8f5-4718-9401-a130b475899b%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>

-- 
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 jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/8ae0e715-b510-4b20-b940-7d75a8f37c1d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: How can we achieve the same effect as Jenkins 1's "Deploy artifacts to Maven repository" with Jenkins 2's pipelines?

2019-01-17 Thread Cyrille Le Clerc
Hello AAron,

This capability is niot av

On Wednesday, January 16, 2019 at 5:16:22 PM UTC+1, Aaron Digulla wrote:
>
> Hello,
>
> For releases, I'd like to build and test all Maven modules and after the 
> build, deploy everything at once (otherwise, someone has to waste time to 
> clean up the mess in Nexus).
>
> In Jenkins 1, this was simple: Build with "mvn clean install" and add a 
> post-build job "Deploy artifacts to Maven repository".
>
> Jenkins 2 still maintains a list of all artifacts which need to be 
> deployed but I couldn't find the out how to recreate the old post-build job.
>
> How do I do that?
>
> Regards,
>

-- 
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 jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/8813b207-d8f5-4718-9401-a130b475899b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: pipeline-maven-plugin stucks

2018-12-17 Thread Cyrille Le Clerc
Thanks Dan for the feedback.


> Love to see Postgres support since all of our in house DB using Postgres

We prefer to focus for the moment on MySQL and get it right before 
extending to other RDBMS (ie PostgreSQL).
We picked MySQL because it was the most pervasive RDBMS we looked at.

Cyrille


On Sunday, December 16, 2018 at 9:52:11 PM UTC+1, Dan Tran wrote:
>
>
> Love to see Postgres support since all of our in house DB using Postgres
>
> For now, we are preparing to switch to mysql
>
> -D
>
> On Friday, December 14, 2018 at 7:44:36 AM UTC-8, Cyrille Le Clerc wrote:
>>
>> Please upgrade to the latest version of the Pipeline Maven Plugin and use 
>> a MySQL database.
>>
>> Cyrille
>>
>

-- 
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 jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/7951b4b8-74c0-42cd-a423-a7ddc49db366%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: pipeline-maven-plugin stucks

2018-12-14 Thread Cyrille Le Clerc
Please upgrade to the latest version of the Pipeline Maven Plugin and use a 
MySQL database.

Cyrille

On Wednesday, October 24, 2018 at 6:07:32 AM UTC+2, Dan Tran wrote:
>
>
> We are at latest LTS Jenkins and plugins.
>
> I turned out, the H2 db is corrupted (according to trace file).  We able 
> to get the system back  with brand new DB file
>
> -D
>
> On Tuesday, October 23, 2018 at 8:37:21 PM UTC-7, Jan Monterrubio wrote:
>>
>> What version of workflow cps are you using? 
>>
>> On Tue, Oct 23, 2018 at 16:54 Dan Tran  wrote:
>>
>>> Hi
>>>
>>> We are experiencing all build hangs at the end and the stack trace shows
>>>
>>> Running 
>>> CpsFlowExecution[Owner[ecdm/ecdm-projects/ecdm/future%2Fmiles/59:ecdm/ecdm-projects/ecdm/future%2Fmiles
>>>  #59]]
>>>   at 
>>> org.h2.jdbcx.JdbcConnectionPool.getConnection()Ljava/sql/Connection; 
>>> (JdbcConnectionPool.java:196)
>>>   at 
>>> org.jenkinsci.plugins.pipeline.maven.dao.PipelineMavenPluginH2Dao.getOrCreateBuildPrimaryKey(Ljava/lang/String;I)J
>>>  (PipelineMavenPluginH2Dao.java:369)
>>>   at 
>>> org.jenkinsci.plugins.pipeline.maven.dao.PipelineMavenPluginH2Dao.recordParentProject(Ljava/lang/String;ILjava/lang/String;Ljava/lang/String;Ljava/lang/String;Z)V
>>>  (PipelineMavenPluginH2Dao.java:177)
>>>   at 
>>> org.jenkinsci.plugins.pipeline.maven.dao.PipelineMavenPluginMonitoringDao.recordParentProject(Ljava/lang/String;ILjava/lang/String;Ljava/lang/String;Ljava/lang/String;Z)V
>>>  (PipelineMavenPluginMonitoringDao.java:45)
>>>   at 
>>> org.jenkinsci.plugins.pipeline.maven.publishers.PipelineGraphPublisher.recordParentProject(Ljava/util/List;Ljava/util/List;Lhudson/model/Run;Lhudson/model/TaskListener;Lorg/jenkinsci/plugins/pipeline/maven/dao/PipelineMavenPluginDao;)V
>>>  (PipelineGraphPublisher.java:133)
>>>
>>>
>>> and teh embbeded H2 database size is abut 350M.  is it a sign of scaling 
>>> issue since we have pipelines which host  main and PR builds for a large 
>>> maven project with many modules
>>>
>>>
>>> A restart jenkins every 2 hours is needed
>>>
>>>
>>> Suggestion is greatly apprecicated
>>>
>>>
>>> -D
>>>
>>> -- 
>>> 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 jenkinsci-use...@googlegroups.com.
>>> To view this discussion on the web visit 
>>> https://groups.google.com/d/msgid/jenkinsci-users/30bb41c9-8dc5-4762-bdcb-82ef0a667496%40googlegroups.com
>>>  
>>> 
>>> .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>

-- 
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 jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/d7d9522a-be2c-4816-9711-cfc155cc4b20%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: jacoco plugin broken after update of Pipeline Maven Integration plugin

2018-10-22 Thread Cyrille Le Clerc
Can you please test the fix to prevent rendering publishing multiple jacoco 
reports in case of Maven multi-module projects with multiple usage of 
jacoco.

https://github.com/jenkinsci/pipeline-maven-plugin/releases/tag/pipeline-maven-3.5.15-beta-3

On Thursday, October 18, 2018 at 11:42:08 PM UTC+2, Cyrille Le Clerc wrote:
>
> Hi,
>
> I described a workaround on 
> https://issues.jenkins-ci.org/browse/JENKINS-54139
>
> Thanks Keith for filling the bug.
>
> Cyrille
>
>
> On Thursday, October 18, 2018 at 10:57:58 AM UTC+2, KeithC wrote:
>>
>> FYI, I created a bug report for this:  
>> https://issues.jenkins-ci.org/browse/JENKINS-54139
>>
>> On Monday, October 1, 2018 at 5:50:31 AM UTC-7, jenkin...@sourco.de 
>> wrote:
>>>
>>> Hello, 
>>>
>>> I recently updated the Pipeline Maven Integration plugin to version 
>>> 3.1.2 (from 3.1). 
>>>
>>> Since then the Jacoco plugin does not work anymore. 
>>> Jacoco (code coverage) trend graphs for all past builds are rendered 
>>> onto every build page making it unreadable and also very long to load. 
>>>
>>> In the Jenkins log I see: 
>>> java.lang.RuntimeException: While reading class directory: 
>>> /var/lib/jenkins/jobs/myproject/branches/main/builds/561/jacoco/classes 
>>> at 
>>> hudson.plugins.jacoco.ExecutionFileLoader.analyzeStructure(ExecutionFileLoader.java:131)
>>>  
>>>
>>> at 
>>> hudson.plugins.jacoco.ExecutionFileLoader.loadBundleCoverage(ExecutionFileLoader.java:137)
>>>  
>>>
>>> at 
>>> hudson.plugins.jacoco.JacocoReportDir.parse(JacocoReportDir.java:110) 
>>> at 
>>> hudson.plugins.jacoco.JacocoBuildAction.loadRatios(JacocoBuildAction.java:339)
>>>  
>>>
>>> at 
>>> hudson.plugins.jacoco.JacocoBuildAction.load(JacocoBuildAction.java:326) 
>>> at 
>>> hudson.plugins.jacoco.JacocoPublisher.perform(JacocoPublisher.java:657) 
>>> at 
>>> org.jenkinsci.plugins.pipeline.maven.publishers.JacocoReportPublisher.process(JacocoReportPublisher.java:213)
>>>  
>>>
>>> at 
>>> org.jenkinsci.plugins.pipeline.maven.MavenSpyLogProcessor.processMavenSpyLogs(MavenSpyLogProcessor.java:118)
>>>  
>>>
>>> at 
>>> org.jenkinsci.plugins.pipeline.maven.WithMavenStepExecution$WithMavenStepExecutionCallBack.finished(WithMavenStepExecution.java:1053)
>>>  
>>>
>>> at 
>>> org.jenkinsci.plugins.workflow.steps.BodyExecutionCallback$TailCall.onSuccess(BodyExecutionCallback.java:114)
>>>  
>>>
>>> at 
>>> org.jenkinsci.plugins.workflow.cps.CpsBodyExecution$SuccessAdapter.receive(CpsBodyExecution.java:368)
>>>  
>>>
>>> at com.cloudbees.groovy.cps.Outcome.resumeFrom(Outcome.java:73) 
>>> at 
>>> com.cloudbees.groovy.cps.Continuable$1.call(Continuable.java:166) 
>>> at 
>>> com.cloudbees.groovy.cps.Continuable$1.call(Continuable.java:163) 
>>> at 
>>> org.codehaus.groovy.runtime.GroovyCategorySupport$ThreadCategoryInfo.use(GroovyCategorySupport.java:129)
>>>  
>>>
>>> at 
>>> org.codehaus.groovy.runtime.GroovyCategorySupport.use(GroovyCategorySupport.java:268)
>>>  
>>>
>>> at 
>>> com.cloudbees.groovy.cps.Continuable.run0(Continuable.java:163) 
>>> at 
>>> org.jenkinsci.plugins.workflow.cps.SandboxContinuable.access$101(SandboxContinuable.java:34)
>>>  
>>>
>>> at 
>>> org.jenkinsci.plugins.workflow.cps.SandboxContinuable.lambda$run0$0(SandboxContinuable.java:59)
>>>  
>>>
>>> at 
>>> org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.GroovySandbox.runInSandbox(GroovySandbox.java:108)
>>>  
>>>
>>> at 
>>> org.jenkinsci.plugins.workflow.cps.SandboxContinuable.run0(SandboxContinuable.java:58)
>>>  
>>>
>>> at 
>>> org.jenkinsci.plugins.workflow.cps.CpsThread.runNextChunk(CpsThread.java:182)
>>>  
>>>
>>> at 
>>> org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.run(CpsThreadGroup.java:332)
>>>  
>>>
>>> at 
>>> org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.access$200(CpsThreadGroup.java:83)
>>>  
>>>
>>> at 
>>> 

Re: jacoco plugin broken after update of Pipeline Maven Integration plugin

2018-10-18 Thread Cyrille Le Clerc
Hi,

I described a workaround 
on https://issues.jenkins-ci.org/browse/JENKINS-54139

Thanks Keith for filling the bug.

Cyrille


On Thursday, October 18, 2018 at 10:57:58 AM UTC+2, KeithC wrote:
>
> FYI, I created a bug report for this:  
> https://issues.jenkins-ci.org/browse/JENKINS-54139
>
> On Monday, October 1, 2018 at 5:50:31 AM UTC-7, jenkin...@sourco.de wrote:
>>
>> Hello, 
>>
>> I recently updated the Pipeline Maven Integration plugin to version 
>> 3.1.2 (from 3.1). 
>>
>> Since then the Jacoco plugin does not work anymore. 
>> Jacoco (code coverage) trend graphs for all past builds are rendered 
>> onto every build page making it unreadable and also very long to load. 
>>
>> In the Jenkins log I see: 
>> java.lang.RuntimeException: While reading class directory: 
>> /var/lib/jenkins/jobs/myproject/branches/main/builds/561/jacoco/classes 
>> at 
>> hudson.plugins.jacoco.ExecutionFileLoader.analyzeStructure(ExecutionFileLoader.java:131)
>>  
>>
>> at 
>> hudson.plugins.jacoco.ExecutionFileLoader.loadBundleCoverage(ExecutionFileLoader.java:137)
>>  
>>
>> at 
>> hudson.plugins.jacoco.JacocoReportDir.parse(JacocoReportDir.java:110) 
>> at 
>> hudson.plugins.jacoco.JacocoBuildAction.loadRatios(JacocoBuildAction.java:339)
>>  
>>
>> at 
>> hudson.plugins.jacoco.JacocoBuildAction.load(JacocoBuildAction.java:326) 
>> at 
>> hudson.plugins.jacoco.JacocoPublisher.perform(JacocoPublisher.java:657) 
>> at 
>> org.jenkinsci.plugins.pipeline.maven.publishers.JacocoReportPublisher.process(JacocoReportPublisher.java:213)
>>  
>>
>> at 
>> org.jenkinsci.plugins.pipeline.maven.MavenSpyLogProcessor.processMavenSpyLogs(MavenSpyLogProcessor.java:118)
>>  
>>
>> at 
>> org.jenkinsci.plugins.pipeline.maven.WithMavenStepExecution$WithMavenStepExecutionCallBack.finished(WithMavenStepExecution.java:1053)
>>  
>>
>> at 
>> org.jenkinsci.plugins.workflow.steps.BodyExecutionCallback$TailCall.onSuccess(BodyExecutionCallback.java:114)
>>  
>>
>> at 
>> org.jenkinsci.plugins.workflow.cps.CpsBodyExecution$SuccessAdapter.receive(CpsBodyExecution.java:368)
>>  
>>
>> at com.cloudbees.groovy.cps.Outcome.resumeFrom(Outcome.java:73) 
>> at 
>> com.cloudbees.groovy.cps.Continuable$1.call(Continuable.java:166) 
>> at 
>> com.cloudbees.groovy.cps.Continuable$1.call(Continuable.java:163) 
>> at 
>> org.codehaus.groovy.runtime.GroovyCategorySupport$ThreadCategoryInfo.use(GroovyCategorySupport.java:129)
>>  
>>
>> at 
>> org.codehaus.groovy.runtime.GroovyCategorySupport.use(GroovyCategorySupport.java:268)
>>  
>>
>> at 
>> com.cloudbees.groovy.cps.Continuable.run0(Continuable.java:163) 
>> at 
>> org.jenkinsci.plugins.workflow.cps.SandboxContinuable.access$101(SandboxContinuable.java:34)
>>  
>>
>> at 
>> org.jenkinsci.plugins.workflow.cps.SandboxContinuable.lambda$run0$0(SandboxContinuable.java:59)
>>  
>>
>> at 
>> org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.GroovySandbox.runInSandbox(GroovySandbox.java:108)
>>  
>>
>> at 
>> org.jenkinsci.plugins.workflow.cps.SandboxContinuable.run0(SandboxContinuable.java:58)
>>  
>>
>> at 
>> org.jenkinsci.plugins.workflow.cps.CpsThread.runNextChunk(CpsThread.java:182)
>>  
>>
>> at 
>> org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.run(CpsThreadGroup.java:332)
>>  
>>
>> at 
>> org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.access$200(CpsThreadGroup.java:83)
>>  
>>
>> at 
>> org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$2.call(CpsThreadGroup.java:244)
>>  
>>
>> at 
>> org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$2.call(CpsThreadGroup.java:232)
>>  
>>
>> at 
>> org.jenkinsci.plugins.workflow.cps.CpsVmExecutorService$2.call(CpsVmExecutorService.java:64)
>>  
>>
>> at java.util.concurrent.FutureTask.run(FutureTask.java:266) 
>> at 
>> hudson.remoting.SingleLaneExecutorService$1.run(SingleLaneExecutorService.java:131)
>>  
>>
>> at 
>> jenkins.util.ContextResettingExecutorService$1.run(ContextResettingExecutorService.java:28)
>>  
>>
>> at 
>> jenkins.security.ImpersonatingExecutorService$1.run(ImpersonatingExecutorService.java:59)
>>  
>>
>> at 
>> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) 
>> at java.util.concurrent.FutureTask.run(FutureTask.java:266) 
>> at 
>> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
>>  
>>
>> at 
>> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
>>  
>>
>> at java.lang.Thread.run(Thread.java:748) 
>> Caused by: java.lang.IllegalStateException: basedir 
>> /var/lib/jenkins/jobs/myproject/branches/main/builds/561/jacoco/classes 
>> does not exist 
>> at 
>> org.codehaus.plexus.util.DirectoryScanner.scan(DirectoryScanner.java:281) 
>> at 
>> org.codehaus.ple

Re: withMaven Artifacts URL

2018-08-15 Thread Cyrille Le Clerc
Thanks Bernardo for your interest in the Pipeline Maven integration.

Can you please describe more the data you are interested in so that we can 
fine tune the solution? 

Is it primarily the URLs of the artifacts deployed on your Maven repository 
(Nexus, Artifactory...)? Are you interested in more data (dependencies, 
test reports...)? hat is the role of the system that will consume these 
data? Is this system consuming data from other systems? How does it 
proceeds? what's the APIs & data formats?

Cyrille


On Tuesday, August 14, 2018 at 3:03:19 AM UTC+2, Bernardo Vale wrote:
>
> Hey guys.
>
> I'm looking for a way to programmatically determine the URL of an artifact 
> generated by withMaven (Maven Pipeline Plugin).
>
> When I deploy an artifact using withMaven, it generates the URL of each 
> artifact inside: $JENKINS_SERVER/path/to/job/8/maven
>
> I'd like to programmatically consume this information.
>

-- 
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 jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/036ae2e0-0ec6-4224-a446-089e6ce25f2f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Unexpected withMaven downstream jobs skipping

2018-08-04 Thread Cyrille Le Clerc
Hello Dan

Can you confirm that you have the following graph of dependencies with "job 
C" NOT being triggered by "job B" when "job A" is building?


+-+
+---+-->+job C|
|   |   +-+
|   |
|   |
|   |
+-+ |  +-+  |
|job A+-+->+job B+--+
+-++-+


The idea of "smart skipping" is that if "job A" is building when "job B" 
considers to trigger "job C", then we should skip the trigger of "job C" 
because very soon, "job A" will finish and will trigger "job B" that will 
itself trigger "job C".

Would this work in your use case?
Isn't it what you see?

Cyrille


On Friday, August 3, 2018 at 8:49:41 PM UTC+2, Dan Tran wrote:
>
> Hello
>
> I have  3 level withMaven jobs under the same bitbucket multibranch 
> pipeline with setup to allow this scenario
>
>   * A -->  B --> C(s)
>
> It works.  However, if A is actively building, job C will never get 
> called, the job B log shows this
>
> [Bitbucket] Build result notified
> [withMaven] Not triggering job-C because it has a dependency job-A already 
> building or in queue
>
>
> note i configure job-C to depend on job-B, and job-B to depend on job-A ( via 
> maven dependency )
>
>
> is it a bug?
>
>
> Thanks
>
>
> -D
>
>
>

-- 
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 jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/f384b628-6b9c-411d-b0e0-3de759b87236%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: withMaven triggers same project?

2018-04-02 Thread Cyrille Le Clerc
Thanks Tran, this is definitively not desired.

Conversation continuing 
on https://issues.jenkins-ci.org/browse/JENKINS-50507

On Monday, April 2, 2018 at 12:16:44 AM UTC+2, Dan Tran wrote:
>
> I think I found the root cause  of my cyclic trigger
>
> My pipeline has 2 OS specific stages: Linux and Windows, where the windows 
> stage requires an artifact built by  Linux stage via withMaven.  This 
> causes withMaven to trigger its very won pipeline
>
> Will file an enhancement request
>
> -D
>

-- 
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 jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/256bf545-cb66-4bf7-8b7a-f0ee192b7c5c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: withMaven dependency trigger - Need help to understand the error message

2018-03-13 Thread Cyrille Le Clerc
Ack.

We need to improve the troubleshooting guide "Why my downstream job doesn't 
get triggered".

A SQL approach could be interesting but as our queries are no trivial, 
there would be a risk of misunderstanding. Maybe adding a troubleshooting 
API/GUI/CLI on the withMaven pipeline graph is the most efficient way.

Cyrille

On Tuesday, March 13, 2018 at 3:12:38 AM UTC+1, Dan Tran wrote:
>
> I believe I don't have the scenario that you described.  Mine is more 
> likeProject A, B, and C   depends on D,   after D builds, A, B, and C 
> are not built
>
> So I need to troubleshoot, to see what I missed from my setup
>
> -D
>
> On Monday, March 12, 2018 at 9:00:20 AM UTC-7, Cyrille Le Clerc wrote:
>>
>>
>> > How can I troubleshoot this?
>>
>> I discussed this feature with Arnaud Héritier today for another use case.
>>
>> My understanding is that it is "work as design" and that you ask for an 
>> improvement to disable this JENKINS-46313 Avoid excessive triggering of 
>> downstream jobs <https://issues.jenkins-ci.org/browse/JENKINS-46313>
>>  capability.
>>
>> Do you have the same understanding of the status? If so, can you please 
>> open an RFE ticket on Jira?
>>
>> Cyrille
>>
>>
>> https://github.com/jenkinsci/pipeline-maven-plugin/blob/pipeline-maven-3.4.3/jenkins-plugin/src/main/java/org/jenkinsci/plugins/pipeline/maven/listeners/DownstreamPipelineTriggerRunListener.java#L74
>>
>> On Sunday, March 11, 2018 at 8:05:40 PM UTC+1, Dan Tran wrote:
>>>
>>> Thanks for the explanation.  It is clear now
>>>
>>> In my case, I downstream should be built regardless, but it is not.  
>>>
>>> How can I troubleshoot this?
>>>
>>> Thanks
>>>
>>> -D
>>>
>>> On Sunday, March 11, 2018 at 9:37:13 AM UTC-7, Cyrille Le Clerc wrote:
>>>>
>>>> Sample: projects framework, shared-lib and webapp.
>>>>
>>>> Both shared-lib and webapp depend on framework and webapp also depend 
>>>> on shared-lib.
>>>>
>>>> When framework build succeeds, it should trigger both shared-lib and 
>>>> webapp. But it's a "waste" to trigger webapp now because shared-lib will 
>>>> trigger "webapp" when it succeeds.
>>>>
>>>> This is the message you get.
>>>>
>>>>

-- 
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 jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/44d60c5b-5295-4c7e-975d-e2363c2171b1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: withMaven dependency trigger - Need help to understand the error message

2018-03-12 Thread Cyrille Le Clerc

> How can I troubleshoot this?

I discussed this feature with Arnaud Héritier today for another use case.

My understanding is that it is "work as design" and that you ask for an 
improvement to disable this JENKINS-46313 Avoid excessive triggering of 
downstream jobs <https://issues.jenkins-ci.org/browse/JENKINS-46313>
 capability.

Do you have the same understanding of the status? If so, can you please 
open an RFE ticket on Jira?

Cyrille

https://github.com/jenkinsci/pipeline-maven-plugin/blob/pipeline-maven-3.4.3/jenkins-plugin/src/main/java/org/jenkinsci/plugins/pipeline/maven/listeners/DownstreamPipelineTriggerRunListener.java#L74

On Sunday, March 11, 2018 at 8:05:40 PM UTC+1, Dan Tran wrote:
>
> Thanks for the explanation.  It is clear now
>
> In my case, I downstream should be built regardless, but it is not.  
>
> How can I troubleshoot this?
>
> Thanks
>
> -D
>
> On Sunday, March 11, 2018 at 9:37:13 AM UTC-7, Cyrille Le Clerc wrote:
>>
>> Sample: projects framework, shared-lib and webapp.
>>
>> Both shared-lib and webapp depend on framework and webapp also depend on 
>> shared-lib.
>>
>> When framework build succeeds, it should trigger both shared-lib and 
>> webapp. But it's a "waste" to trigger webapp now because shared-lib will 
>> trigger "webapp" when it succeeds.
>>
>> This is the message you get.
>>
>>

-- 
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 jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/b3696a8c-4d89-4aa2-9e23-5d8b8ca7dfd7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


withMaven dependency trigger - Need help to understand the error message

2018-03-11 Thread Cyrille Le Clerc
Sample: projects framework, shared-lib and webapp.

Both shared-lib and webapp depend on framework and webapp also depend on 
shared-lib.

When framework build succeeds, it should trigger both shared-lib and webapp. 
But it's a "waste" to trigger webapp now because shared-lib will trigger 
"webapp" when it succeeds.

This is the message you get.

-- 
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 jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/78a2e901-16de-446d-8650-613f6d926bf0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Question about JDK and Maven through Jenkins

2018-02-19 Thread Cyrille Le Clerc
Can you install "java-1.8.0-openjdk-devel" on your server so that javac-1.8 
is also installed?

I suspect that Jenkins and Maven get tricked by the fact that your default 
"java" installation doesn't have a "javac" compiler.

If you cannot install "java-1.8.0-openjdk-devel", I strongly recommend to 
rely on Jenkins' capability to install a JDK:

   - In Jenkins UI, with Jenkins administrator privileges, navigate to 
   "Manage Jenkins / Global Tools Installer"
   - In the "JDK" section, click on "JDK Installations..." then "Add JDK"
  - Choose the name "1.8"
  - Select a JDK 8 version (e.g. "Java SE Development Kit 8u162")
  - Enter oracle.com credentials 
   - Update your pipeline script and add "jdk: '1.8' "to your "withMaven"() 
   step: "withMaven(jdk: 1.8', ...){...}"

Cyrille

On Monday, February 19, 2018 at 11:29:09 AM UTC+1, Fábio Cabrita wrote:
>
> Here are both command paths:
>
> root@jenkins-server /h/jenkins> which java
> /bin/java
> root@jenkins-server /h/jenkins> which javac
> /bin/javac
>
> While checking mvn, I notice that Java home is set to JRE instead of JDK:
>
> [jenkins@jenkins-server ~]$ mvn --version
> Apache Maven 3.5.2 (138edd61fd100ec658bfa2d307c43b76940a5d7d; 2017-10-
> 18T08:58:13+01:00)
> Maven home: /usr/local/maven
> Java version: 1.8.0_161, vendor: Oracle Corporation
> Java home: /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.161-0.b14.el7_4.x86_64/
> jre
> Default locale: en_US, platform encoding: UTF-8
> OS name: "linux", version: "3.10.0-693.17.1.el7.x86_64", arch: "amd64", 
> family: "unix"
>
> Checking Java version:
>
> [jenkins@jenkins-server ~]$ java -version
> openjdk version "1.8.0_161"
> OpenJDK Runtime Environment (build 1.8.0_161-b14)
> OpenJDK 64-Bit Server VM (build 25.161-b14, mixed mode)
>
> In this system I have several Java's versions installed in this system:
>
> [root@jenkins-server ~]# sudo update-alternatives --config java
>
> There are 2 programs which provide 'java'.
>
>   SelectionCommand
> ---
> *+ 1   java-1.8.0-openjdk.x86_64 (/usr/lib/jvm/java-1.8.0-openjdk-
> 1.8.0.161-0.b14.el7_4.x86_64/jre/bin/java)
>2   java-1.7.0-openjdk.x86_64 (/usr/lib/jvm/java-1.7.0-openjdk-
> 1.7.0.161-2.6.12.0.el7_4.x86_64/jre/bin/java)
>
> [root@jenkins-server ~]# sudo update-alternatives --config javac
>
> There is 1 program that provides 'javac'.
>
> Selection Command
> ---
> *+ 1 java-1.7.0-openjdk.x86_64 (/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.161-
> 2.6.12.0.el7_4.x86_64/bin/javac)
>
> But dont know how to set mavens to use java JDK.
>

-- 
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 jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/89ba8611-110c-476b-97d4-feb337ed8464%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Question about JDK and Maven through Jenkins

2018-02-16 Thread Cyrille Le Clerc
rough Jenkins webservice in Global Tool Configuration but still I
>> have the same output errors.
>>
>> Also at Maven I add the name of maven_3_5_2 and change it in jenkinsfile
>> in that repo that I have cloned to my account.
>>
>> This is a noob question, but I need some guidence here =|
>>
>> Thanks!
>>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "Jenkins Users" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/
> topic/jenkinsci-users/PDdb0_8Lq7Q/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> jenkinsci-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/jenkinsci-users/b66813b4-7f34-4225-b7ba-b1ce461de3ee%40googlegroups.
> com
> <https://groups.google.com/d/msgid/jenkinsci-users/b66813b4-7f34-4225-b7ba-b1ce461de3ee%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
> For more options, visit https://groups.google.com/d/optout.
>



-- 

Cyrille Le Clerc
Director of Product Management CloudBees, Inc.

[image: CloudBees-Logo.png]


M: +33-6.61.33.69.86
E: clecl...@cloudbees.com

Skype: cyrille.leclerc

-- 
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 jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/CADA0CVy1tDopJqaTe8hCKay_7gsn%2BKk6nZ%3DBBLDg%2BZMOqU_juw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Question about JDK and Maven through Jenkins

2018-02-15 Thread Cyrille Le Clerc
Hello Fábio,

Could you have installed a JRE instead of installing a JDK on your build 
agent?

Can you please:

   - Add the following instruction in your Jenkinsfile just before the 
   invocation  sh "mvn..." (1):
  - sh "which java"
  - sh "which javac"
   - Re run the pipeline
   - Share the Jenkinsfile you use?
   - share the build logs with us

Note that if "which javac" fails then your problem is that you have 
installed a JRE when Maven requires a JDK. 

   - A solution is to install a jdk on CentOS "sudo yum install 
   java-1.8.0-openjdk-devel". See http://openjdk.java.net/install/
   - An alternative is to install a JDK through Jenkins Tool Installer

Cyrille

(1) sample
pipeline {
agent any
stages {
 stage ("Build") {
steps {
git "https://github.com/cyrille-leclerc/my-jar.git";
withMaven(maven:"maven-3.5.2") {
writeFile file: '.archive-jenkins-maven-event-spy-logs', text: 
''
sh "which java"
sh "which javac"
sh "mvn clean deploy"
 }
}
}   
}
}

On Wednesday, February 14, 2018 at 7:42:01 PM UTC+1, Fábio Cabrita wrote:
>
> Hello,
>
> Its my first time using jenkins and I am still learning how it works, so 
> if you see some unnecessary info dont be mad lol.
>
> I am using a CentOS 7, and I have installed JAVA(openjdk version 
> "1.8.0_161") and MAVEN(Apache Maven 3.5.2).
>
> Now, I have imported the repo from this tutorial(
> https://www.youtube.com/watch?v=s73nhwYBtzE), to my new account at 
> bitbucket.
>
> As plugins I have install several that to me was looking necessary for 
> that tutorial: https://pastebin.com/zU19r8PV
>
> Then I created a new Pipeline at Jenkins with the right login for my 
> bitbucket repo git.
>
> Then tried to 'Build Now' but it fails at Compile Stage:
>
> [INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ 
> jenkins-example ---
> [INFO] Changes detected - recompiling the module!
> [INFO] Compiling 1 source file to 
> /var/lib/jenkins/workspace/jenkins-example/target/classes
> [INFO] -
> *[ERROR] COMPILATION ERROR :*
> [INFO] -
> *[ERROR] No compiler is provided in this environment. Perhaps you are 
> running on a JRE rather than a JDK?*
> [INFO] 1 error
> [INFO] 1 error
> [INFO] -
> [INFO] 
> 
> [INFO] BUILD FAILURE
> [INFO] 
> 
> [INFO] Total time: 0.767 s
> [INFO] Finished at: 2018-02-13T16:45:06Z
> [INFO] Final Memory: 9M/102M
> [INFO] 
> 
> [INFO] [jenkins-event-spy] Generated 
> /var/lib/jenkins/workspace/jenkins-example@tmp/withMavenabb6bf9d/maven-spy-20180213-164505-820349381958923572055.log
> *[ERROR] Failed to execute goal 
> org.apache.maven.plugins:maven-compiler-plugin:3.1:compile 
> (default-compile) on project jenkins-example: Compilation failure*
> *[ERROR] No compiler is provided in this environment. Perhaps you are 
> running on a JRE rather than a JDK?*
> *[ERROR] -> [Help 1]*
> *[ERROR] *
> *[ERROR] To see the full stack trace of the errors, re-run Maven with the 
> -e switch.*
> *[ERROR] Re-run Maven using the -X switch to enable full debug logging.*
> *[ERROR] *
> *[ERROR] For more information about the errors and possible solutions, 
> please read the following articles:*
> *[ERROR] [Help 1] 
> http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException 
> *
>
> Now a side of having JAVA and MAVIN installed in CentOS, I was trying to 
> use JDK from java.sun.com(with an account from Oracle) and Maven from 
> Apache through Jenkins webservice in Global Tool Configuration but still I 
> have the same output errors.
>
> Also at Maven I add the name of maven_3_5_2 and change it in jenkinsfile 
> in that repo that I have cloned to my account.
>
> This is a noob question, but I need some guidence here =|
>
> Thanks!
>

-- 
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 jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/5ddae108-8576-46dc-9e3d-b19eda55de38%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Disable withMaven publishers default configuration

2017-12-14 Thread Cyrille Le Clerc
Hello,

You had enabled logging on your test master and we display in the build 
logs the logs of the plugin, this is why you had these messages on your 
test masters.

You can disable globally publishers through the Global Tools Configuration 
screen.

The message may not be intuitive but here is what happened:

   - "Use pipeline defined publisher for 'Findbugs Publisher'" --> the 
   config of the findbugs publisher is defined in the pipeline, in 
   "withMaven(options:[findbugsPublisher(...)]"
   - "Skip 'Findbugs Publisher' disabled by configuration" --> the Findbugs 
   Publisher is disabled
   - "pipelineGraphPublisher - triggerDownstreamPipelines" --> even if you 
   disable the "pipelineGraphPublisher" by configuration, we have a listener 
   of the pipeline build completion to decide if we trigger downstream 
   pipelines. We need to wait for the completion of the build because the 
   downstream pipeline trigger strategy is based on the result of the upstream 
   build, you probably don't want to trigger downstream pipelines if your 
   build failed.

Stephen Connolly mentioned another use case:disabling all the 
publishers unless they are explicitly enabled in the pipeline 
("withMaven(options:[myPublisher(enabled: 
true])"). James Nord had created a while ago the RFE JENKINS-46785 add a 
way to disable all reporters (and selectively enable a few) 
.
If have started to work on it with 
https://github.com/jenkinsci/pipeline-maven-plugin/pull/116 and James 
validated the user Experience. I'll provide details later.

Did this clarify your messages?

Cyrille 



On Thursday, December 14, 2017 at 11:46:07 AM UTC+1, nco...@lbisa.com wrote:
>
> Just noticed that PROD has a different logger. It is using:
> org.jenkinsci.plugins.pipeline.maven.WithMavenStepExecution
>
> and test was using:
> org.jenkinsci.plugins.pipeline.maven
>
> Both were set to log level ALL.
> After set test instance to use the same logger, the output are similar in 
> both instances.
>
> Additionally, tested remove the logger from test and seems that the 
> default console output is the same as:
> org.jenkinsci.plugins.pipeline.maven.WithMavenStepExecution
>

-- 
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 jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/1098af7b-6f6e-44ea-9d34-f541ecd856f6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Multiple distinct junit/testng reports with Jenkins pipeline

2017-09-28 Thread Cyrille Le Clerc
Hi,

FYI There have been an attempt to support names for junit reports and thus 
support multiple reports per pipeline but the PR didn't get 
merged https://github.com/jenkinsci/junit-plugin/pull/64

Cyrille

On Wednesday, September 27, 2017 at 10:32:13 AM UTC+2, Hyunil Shin wrote:
>
> thank you for the research.
> I also wanted this, multiple junit reports.
>
> On Thursday, December 29, 2016 at 5:40:29 PM UTC+9, Dan Tran wrote:
>>
>> scratch this
>>
>> jenkins only allows one report per job
>>
>> -D
>>
>> On Wednesday, December 28, 2016 at 11:40:18 PM UTC-8, Dan Tran wrote:
>>>
>>> Hi
>>>
>>> I have a Jenkins pipeline with multiple test stages, instead of 
>>> aggregate the report in one step, I would like to do a report per stage 
>>> with distinct name. Possible???
>>>
>>> This way,  I should see a list of reports show up at left navigation
>>>
>>> Very much appreciated any help
>>>
>>> -Dan
>>>
>>

-- 
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 jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/d45a15b2-15ff-4fe5-80d3-bb178a85344c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Pipeline Maven: Running on Windows slave

2017-09-12 Thread Cyrille Le Clerc
Hello Svere,

It seems that we have some work to make withMaven(){} more friendly to 
Windows+Cygwin users.

We have already tracked:

   - JENKINS-44089 Request that withMaven pipeline step produce both mvn 
   and mvn.cmd wrappers on Windows 
   
   - JENKINS-44276 Maven fails in pipeline + cygwin 
   
   
Some refactoring of the code will be needed to generate both standard 
Windows and Cygwin friendly scripts on Windows agents.

Please feel free to give us hints on what a smooth integration with Windows 
and Cygwin should look like.

Cyrille

On Monday, September 11, 2017 at 9:08:53 AM UTC+2, Baptiste Mathus wrote:
>
> Hello,
> I know the developers of that plugin would like to make it as good as 
> possible. To that, if so, could you please try and summarize what you think 
> could be made easier/better? And even if possibly a config error, if you 
> think the error could help more quickly understand what is wrong?
>
> Thanks!
>
> Le 11 sept. 2017 09:03, "Sverre Moe" > a 
> écrit :
>
>> The fix was to set the Windows slave Remote Root Directory to Windows URI
>> C:\cygwin64\home\username
>>
>> mandag 11. september 2017 08.35.29 UTC+2 skrev Sverre Moe følgende:
>>>
>>> Well, adding a new JDK in Jenkins Tools pointing to the Windows path of 
>>> Java worked
>>> Then withMaven(jdk: "jdk1.8-win")
>>>
>>> I have though hit another snag. Lots of ERROR after build success.
>>> ERROR: [withMaven] WARNING: Exception archiving and fingerprinting 
>>> MavenArtifact{no.spacetec:myApp:jar:1.0.0-SNAPSHOT 
>>> C:\home\username\workspace\myApp_username_work-3U54DPE57F6TMOZM2O6QBWDQ2LNRU2QHAXT6INC3UPGWF2ERMXAQ\target\myApp-1.0.0-SNAPSHOT.jar},
>>>  
>>> skip archiving of the artifacts
>>>
>>> ERROR: [withMaven] WARNING: Exception archiving and fingerprinting 
>>> MavenArtifact{no.spacetec:myApp:rpm:1.0.0-SNAPSHOT 
>>> C:\home\username\workspace\myApp_username_work-3U54DPE57F6TMOZM2O6QBWDQ2LNRU2QHAXT6INC3UPGWF2ERMXAQ\target\rpm\myApp-windows-installer\RPMS\noarch\myApp-windows-installer-1.0.0-SNAPSHOT20170911082120.noarch.rpm},
>>>  
>>> skip archiving of the artifacts
>>>
>>> ERROR: [withMaven] WARNING Exception executing Maven reporter 'Junit 
>>> Publisher' / 
>>> org.jenkinsci.plugins.pipeline.maven.publishers.JunitTestsPublisher. Please 
>>> report a bug associated for the component 'pipeline-maven-plugin' at 
>>> https://issues.jenkins-ci.org 
>>> java.lang.IllegalArgumentException: Cannot relativize 
>>> 'C:\home\username\workspace\myApp_username_work-3U54DPE57F6TMOZM2O6QBWDQ2LNRU2QHAXT6INC3UPGWF2ERMXAQ\target/surefire-reports'
>>>  
>>> relatively to 
>>> '/home/username/workspace/myApp_username_work-3U54DPE57F6TMOZM2O6QBWDQ2LNRU2QHAXT6INC3UPGWF2ERMXAQ'
>>> at 
>>> org.jenkinsci.plugins.pipeline.maven.util.XmlUtils.getPathInWorkspace(XmlUtils.java:226)
>>> at 
>>> org.jenkinsci.plugins.pipeline.maven.publishers.JunitTestsPublisher.executeReporter(JunitTestsPublisher.java:234)
>>> at 
>>> org.jenkinsci.plugins.pipeline.maven.publishers.JunitTestsPublisher.process(JunitTestsPublisher.java:181)
>>> at org.jenkinsci.plugins.pipeline.maven.MavenSpyLogProcessor.pr
>>> ocessMavenSpyLogs(MavenSpyLogProcessor.java:109)
>>> at 
>>> org.jenkinsci.plugins.pipeline.maven.WithMavenStepExecution$Callback.finished(WithMavenStepExecution.java:864)
>>> at 
>>> org.jenkinsci.plugins.workflow.steps.BodyExecutionCallback$TailCall.onSuccess(BodyExecutionCallback.java:114)
>>> at 
>>> org.jenkinsci.plugins.workflow.cps.CpsBodyExecution$SuccessAdapter.receive(CpsBodyExecution.java:362)
>>> at com.cloudbees.groovy.cps.Outcome.resumeFrom(Outcome.java:73)
>>> at com.cloudbees.groovy.cps.Continuable$1.call(Continuable.java:165)
>>> at com.cloudbees.groovy.cps.Continuable$1.call(Continuable.java:162)
>>> at org.codehaus.groovy.runtime.Gr
>>> oovyCategorySupport$ThreadCategoryInfo.use(GroovyCategorySupport.java:122)
>>> at org.codehaus.groovy.runtime.Gr
>>> oovyCategorySupport.use(GroovyCategorySupport.java:261)
>>> at com.cloudbees.groovy.cps.Continuable.run0(Continuable.java:162)
>>> at 
>>> org.jenkinsci.plugins.workflow.cps.SandboxContinuable.access$001(SandboxContinuable.java:19)
>>> at 
>>> org.jenkinsci.plugins.workflow.cps.SandboxContinuable$1.call(SandboxContinuable.java:35)
>>> at 
>>> org.jenkinsci.plugins.workflow.cps.SandboxContinuable$1.call(SandboxContinuable.java:32)
>>> at 
>>> org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.GroovySandbox.runInSandbox(GroovySandbox.java:108)
>>> at 
>>> org.jenkinsci.plugins.workflow.cps.SandboxContinuable.run0(SandboxContinuable.java:32)
>>> at 
>>> org.jenkinsci.plugins.workflow.cps.CpsThread.runNextChunk(CpsThread.java:174)
>>> at 
>>> org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.run(CpsThreadGroup.java:330)
>>> at 
>>> org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.access$100(CpsThreadGroup.java:82)
>>> at 
>>> org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$2.call(CpsTh

Re: How to automatically calculating maven release build version through jenkins pipeline build

2017-07-23 Thread Cyrille Le Clerc
Hello Hound,

The Pipeline Maven Plugin 
 is looking 
at providing a better integration of Maven in pipelines but w cannot yet 
expose the version of the artifacts built by Maven (e.g. through 
environment variables).

In the meantime, I think Karl's recommendation to use the Pipeline Utility 
Step and "readMavenPom('pom.xml') " is the best solution.

Cyrille

On Saturday, July 22, 2017 at 6:24:38 PM UTC+2, Karl Heinz Marbaise wrote:
>
> On 22/07/17 17:54, Hound G wrote: 
> > I am trying to write a pipeline script which does "Perform Maven 
> > Release" functionality.  I am unable to figure out a way to 
> > automatically calculate release version like the maven plugin does. 
> > Can anyone help ? 
>
> I wouldn't calculate the version myself I would simply read the version 
> from the pom files...which can be achieved by using the 
> pipeline-utility-steps like this: 
>
>
> def model = readMavenPom('pom.xml') 
>
> def version = model.version 
>
> Kind regards 
> Karl Heinz Marbaise 
>
>
> https://jenkins.io/doc/pipeline/steps/pipeline-utility-steps/#code-readmavenpom-code-read-a-maven-project-file
>  
>

-- 
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 jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/7594dc77-c6d4-49e0-ad95-957ea9a7c4ea%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Jenkins Personal Credentials

2017-07-19 Thread Cyrille Le Clerc
Hi all,

For the record, we have recently opened

   - 
   - JENKINS-44773 User Scoped credentials are not used by the "git" 
   pipeline step 
   - 
   - JENKINS-44774 User Scoped credentials don't appear in credentials drop 
   down lists 

Cyrille

On Monday, August 10, 2015 at 10:06:13 AM UTC+2, Jörg Steffen wrote:
>
> Hi all,
>
> we are using Jenkins 1.624 together with the Credentials plugin 1.22 and 
> have set the security realm to
> Jenkins’ own user database. According to the documentation of the 
> Credentials plugin, a user can add personal credentials via "Users"/ your 
> username / "Configure". This works fine, but the credentials entered are 
> not available when creating a new job. In the "Source Code Management" 
> section, neither for Subversion nor Git the personal credentials can be 
> selected. Only credentials that have been set "globally" are available. 
>
> Is there any way to make the personal credentials available?
>
> Best regards,
> Jörg
>
>

-- 
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 jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/f58a94f3-a69c-476a-aa1c-ff9a0b7e845c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: adding custom parameters to configure publishers in withMaven pipeline step

2017-05-21 Thread Cyrille Le Clerc
Configuration options to override default settings have been added for the 
OpenTaskScanner in pipeline-maven-2.3.1-beta-1 
<https://github.com/jenkinsci/pipeline-maven-plugin/releases/tag/pipeline-maven-2.3.1-beta-1>
.

It looks like: 

withMaven(options:[openTasksPublisher(
   pattern:'src/main/java', excludePattern:'src/main/java/excluded',
   ignoreCase:true, asRegexp:false, 
   lowPriorityTaskIdentifiers:'minor', 
normalPriorityTaskIdentifiers:'todo', highPriorityTaskIdentifiers:'fixme')]) {

   sh 'mvn package verify'
}


Cyrille

On Tuesday, May 16, 2017 at 2:13:32 PM UTC+2, Cyrille Le Clerc wrote:
>
> Jesse Glick has answered in 
> https://issues.jenkins-ci.org/browse/JENKINS-43596
>
> I am working on something that will look like withMaven(options: 
> [artifacts(), findbugs(unstableOnThreshold: 5), tests(excludes: 
> '**/PerformanceTest')]) {…}
>
> Cyrille
>
> On Tuesday, May 16, 2017 at 1:52:55 AM UTC-7, Baptiste Mathus wrote:
>>
>> I tend to prefer the hierarchical approach. IMO it should /scale/ better, 
>> being more readable/organized. Without this, you'll indeed end up with very 
>> long options using camelCase. 
>>
>> 2017-05-12 20:16 GMT+02:00 Cyrille Le Clerc :
>>
>>> Note: Mark Lagendijk proposed a hierarchical approach for options in 
>>> JENKINS-43596 <https://issues.jenkins-ci.org/browse/JENKINS-43596>. It 
>>> is a bit more sophisticated, more standardized ... but a bit more verbose 
>>> than what we tried in my previous post
>>>
>>>
>>> *Hierarchical & standardized model*
>>>
>>> withMaven(
>>>
>>>maven: 'maven-3.3.9', 
>>>mavenSettingsConfig: 'maven-settings-for-gameoflife',
>>>options: [
>>>  artifactReporter: [
>>>disabled: true // default = false ],
>>>  someOtherReporter: [
>>>options: [] // whatever options this reporter accepts ] 
>>>]
>>> ) {
>>>
>>>
>>>sh "mvn package"
>>>
>>> }
>>>
>>>
>>> *Flat & not-standardized model*
>>>
>>> withMaven(
>>>
>>>maven: 'maven-3.3.9', 
>>>mavenSettingsConfig: 'maven-settings-for-gameoflife',
>>>options: [
>>>  skipArchiveGeneratedArtifacts: true, 
>>>  fingerprintDependenciesExclude: "org.springframework.*" 
>>>]
>>> ) {
>>>
>>>
>>>sh "mvn package"
>>>
>>> }
>>>
>>>
>>>
>>>
>>>
>>>
>>> On Friday, May 12, 2017 at 11:25:41 AM UTC+2, Cyrille Le Clerc wrote:
>>>>
>>>> Idea discussed with Alvaro Lobato: introduce an "options" Map>>> 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
>>>>

Re: adding custom parameters to configure publishers in withMaven pipeline step

2017-05-16 Thread Cyrille Le Clerc
Jesse Glick has answered 
in https://issues.jenkins-ci.org/browse/JENKINS-43596

I am working on something that will look like withMaven(options: 
[artifacts(), findbugs(unstableOnThreshold: 5), tests(excludes: 
'**/PerformanceTest')]) {…}

Cyrille

On Tuesday, May 16, 2017 at 1:52:55 AM UTC-7, Baptiste Mathus wrote:
>
> I tend to prefer the hierarchical approach. IMO it should /scale/ better, 
> being more readable/organized. Without this, you'll indeed end up with very 
> long options using camelCase. 
>
> 2017-05-12 20:16 GMT+02:00 Cyrille Le Clerc  >:
>
>> Note: Mark Lagendijk proposed a hierarchical approach for options in 
>> JENKINS-43596 <https://issues.jenkins-ci.org/browse/JENKINS-43596>. It 
>> is a bit more sophisticated, more standardized ... but a bit more verbose 
>> than what we tried in my previous post
>>
>>
>> *Hierarchical & standardized model*
>>
>> withMaven(
>>
>>maven: 'maven-3.3.9', 
>>mavenSettingsConfig: 'maven-settings-for-gameoflife',
>>options: [
>>  artifactReporter: [
>>disabled: true // default = false ],
>>  someOtherReporter: [
>>options: [] // whatever options this reporter accepts ] 
>>]
>> ) {
>>
>>
>>sh "mvn package"
>>
>> }
>>
>>
>> *Flat & not-standardized model*
>>
>> withMaven(
>>
>>maven: 'maven-3.3.9', 
>>mavenSettingsConfig: 'maven-settings-for-gameoflife',
>>options: [
>>  skipArchiveGeneratedArtifacts: true, 
>>  fingerprintDependenciesExclude: "org.springframework.*" 
>>]
>> ) {
>>
>>
>>sh "mvn package"
>>
>> }
>>
>>
>>
>>
>>
>>
>> On Friday, May 12, 2017 at 11:25:41 AM UTC+2, Cyrille Le Clerc wrote:
>>>
>>> Idea discussed with Alvaro Lobato: introduce an "options" Map>> 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 jenkinsci-use...@googlegroups.com .
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/jenkinsci-users/e7b7a2c1-067c-487a-945b-53df9babc97b%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/jenkinsci-users/e7b7a2c1-067c-487a-945b-53df9babc97b%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

-- 
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 jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/09d6356f-a202-4ec8-a6ea-9e49c88418cc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: adding custom parameters to configure publishers in withMaven pipeline step

2017-05-12 Thread Cyrille Le Clerc
Note: Mark Lagendijk proposed a hierarchical approach for options in 
JENKINS-43596 <https://issues.jenkins-ci.org/browse/JENKINS-43596>. It is a 
bit more sophisticated, more standardized ... but a bit more verbose than 
what we tried in my previous post


*Hierarchical & standardized model*

withMaven(

   maven: 'maven-3.3.9', 
   mavenSettingsConfig: 'maven-settings-for-gameoflife',
   options: [
 artifactReporter: [
   disabled: true // default = false ],
 someOtherReporter: [
   options: [] // whatever options this reporter accepts ] 
   ]
) {


   sh "mvn package"

}


*Flat & not-standardized model*

withMaven(

   maven: 'maven-3.3.9', 
   mavenSettingsConfig: 'maven-settings-for-gameoflife',
   options: [
 skipArchiveGeneratedArtifacts: true, 
 fingerprintDependenciesExclude: "org.springframework.*" 
   ]
) {


   sh "mvn package"

}






On Friday, May 12, 2017 at 11:25:41 AM UTC+2, Cyrille Le Clerc wrote:
>
> Idea discussed with Alvaro Lobato: introduce an "options" Map 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 jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/e7b7a2c1-067c-487a-945b-53df9babc97b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: adding custom parameters to configure publishers in withMaven pipeline step

2017-05-12 Thread Cyrille Le Clerc
Idea discussed with Alvaro Lobato: introduce an "options" Map 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 jenkinsci-users+unsubscr...@googlegroups.com.
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.


Re: adding custom parameters to configure publishers in withMaven pipeline step

2017-04-14 Thread Cyrille Le Clerc
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 
).
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 jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/29272d88-d317-44a6-8ad4-30647b3b9928%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Docker Pipeline Step

2017-02-24 Thread Cyrille Le Clerc
Hello Peter,

There is a lot of documentation at 
https://go.cloudbees.com/docs/cloudbees-documentation/cje-user-guide/index.html#docker-workflow-sect-build

You can use docker.build(...).inside{...} and 
docker.image("my-image").inside {...}

The sample below should do what you want.

node {
  git '…' // checks out Dockerfile & Makefile
  def myEnv = docker.build 'my-environment:snapshot'
  myEnv.inside {
sh 'make test'
  }
}

Cyrille

On Friday, February 24, 2017 at 7:59:10 AM UTC+1, pe...@cyrusbio.com wrote:
>
> I might just be missing something here.. But it seems like the docker 
> pipeline stuff is pretty busted.
>
> docker.build does *not* seem to return a docker image, even if the build 
> was successful. Nor does docker.image("image id") return a usable image 
> object. I'm rewriting these two functions in a shared groovy library with 
> sh calls rn. Am I crazy? Are other people seeing this? What am I doing 
> wrong?
>
> Thanks,
> -Peter
>

-- 
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 jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/03fdb6ca-80a1-471d-a205-6eb807d832e2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: New Pipeline Maven plugin

2016-11-21 Thread Cyrille Le Clerc
Hello Sven,

> Is it still under development? Is it production ready?

Yes we are working at improving / enhancing it and yes we think it is 
production ready. There are already many users.

> If I do not specify parameter jdk it will choose Java 7, which Jenkins 
has listed as JDK number 2. While Java 8 is number 1 in the list. Does it 
pick the last in the list of JDKs?

If you don't specify a JDK, the shell command will pick the default JVM of 
your PATH. The current strategy for default values is to use the default of 
the build agent (ignoring Jenkins global settings).

We discuss on https://issues.jenkins-ci.org/browse/JENKINS-39407 the idea 
to offer another strategy for defaults that would rely on the Jenkins 
Defaults.

Cyrille

On Monday, November 21, 2016 at 12:27:54 PM UTC+1, Sverre Moe wrote:
>
> I am enquiring the status of Pipeline Maven Integration Plugin.
> https://wiki.jenkins-ci.org/display/JENKINS/Pipeline+Maven+Plugin
>
> Is it still under development? Is it production ready?
>
> Created by the Snippet Generator:
> withMaven(jdk: 'jdk1.8.0_102', maven: 'apache-maven-3.3.3', mavenLocalRepo
> : '', mavenOpts: '', mavenSettingsFilePath: '') {
> sh "mvn clean deploy"
> }
>
> If I do not specify parameter jdk it will choose Java 7, which Jenkins has 
> listed as JDK number 2. While Java 8 is number 1 in the list. Does it pick 
> the last in the list of JDKs?
>
> mandag 15. august 2016 18.08.03 UTC+2 skrev Cyrille Le Clerc følgende:
>>
>> Hello ok999,
>>
>> > Assuming maven was already installed in the node & have the files 
>> configured (settings.xml, local repo etc) from the TOOLS setting of 
>> jenkins.. 
>> > Will this plugin override those settings? 
>>
>> Yes, "withMaven(){}" will override all the settings that you define with 
>> the wrapper. We do it creating a shell wrapper of the "mvn" / "mvn.bat" 
>> command.
>>
>> If you specify a "jdk" with "withMaven(jdk: 'my-jdk'){}" then we will 
>> override "JAVA_HOME" and add this new "$JAVA_HOME/bin" to the "PATH"
>> If you specify a "mavenInstallation" then we will override "MAVEN_HOME", 
>> "M2_HOME", we will ensure that the "mvn" wrapper that we create with 
>> "withMaven()" points to this desired MAven installation.
>> If you specify a "mavenSettingsConfig", we will pass it as a "--settings" 
>> when invoking the "mvn" executable
>> If you specify a "mavenLocalRepo", we will pass the system property 
>> "-Dmaven.repo.local="
>>
>> You can see all these details enabling a FINE logger on 
>> "org.jenkinsci.plugins.pipeline.maven.WithMavenStepExecution"
>>
>> I have created a gist that details these 
>> https://gist.github.com/cyrille-leclerc/a9db59d346c937c8bdde2113df7653d5
>>
>> > And is there any plan for the maven release plugin in pipeline? At the 
>> moment i am using the 'bat' to call the goals for release:prepare and 
>> release:perform   
>>
>> We focus for the moment on covering as many Maven use cases as possible 
>> with the "withMaven(...){}" wrapper. We hope that a Maven execution step 
>> will appear soon.
>>
>> I feel that a Maven release is already pretty straight forward with the 
>> "withMaven(...){}" wrapper. The following code actually works:
>>
>> node {
>>> withMaven(mavenSettingsConfig: 'maven-settings-for-game-of-life', 
>>> mavenInstallation: 'M3', jdk: 'Oracle JDK 8') {
>>> git 'https://github.com/cyrille-leclerc/my-spring-boot-app.git'
>>> sh "mvn release:prepare release:perform"
>>> }
>>> }
>>
>>
>>
>>
>> On Thursday, August 11, 2016 at 10:06:31 PM UTC+2, ok999 wrote:
>>>
>>> Assuming maven was already installed in the node & have the files 
>>> configured (settings.xml, local repo etc) from the TOOLS setting of 
>>> jenkins.. 
>>> Will this plugin override those settings? 
>>>
>>>  withMaven(mavenInstallation: 'M3', mavenLocalRepo: '.repository', 
>>> mavenSettingsConfig: 'maven-settings-for-gameoflife') {
>>> // Run the maven buildsh "mvn clean install"
>>> }
>>>
>>>
>>>
>>> And is there any plan for the maven release plugin in pipeline? At the 
>>> moment

Re: Jenkins Pipeline: how to access credentials variable??

2016-08-18 Thread Cyrille Le Clerc
Hello Phil,

The "withCredentials" step exposes the credentials as Shell Environment 
Variables, not as groovy variables.
You can find more details 
on 
https://support.cloudbees.com/hc/en-us/articles/203802500-Injecting-Secrets-into-Jenkins-Build-Jobs

Regarding Docker credentials, did you consider using the Pipeline Docker 
Plugin and a "docker.withRegistry(...) {}" build wrapper? You can find a 
sample here: 
https://github.com/CloudBees-community/game-of-life/blob/db105fed560ffb3f5880224d1693d72ee2e89097/Jenkinsfile#L16

Cyrille


On Tuesday, August 9, 2016 at 9:20:17 PM UTC+2, Phil Swenson wrote:
>
> I am using the Jenkins Pipeline Plugin, but having trouble getting my 
> docker config credential to do what I need.
>
>
> using code like:
>
> node('docker-slave') { 
>
> withCredentials([[$class: 'UsernamePasswordMultiBinding', 
> credentialsId: 'NEXUS', usernameVariable: 'NEXUS_USERNAME', 
> passwordVariable: 'NEXUS_PASSWORD'],
>  [$class: 'FileBinding', credentialsId: 'DOCKER_REGISTRY', variable: 
> 'DOCKER_CONFIG_PATH']]) {
> def dockerConfigPath = "$DOCKER_CONFIG_PATH"
> 
> 
>
>
> the dockerConfigPath above does not get populated as I'd hope...
>
>
>
> The variable DOCKER_CONFIG_PATH passes in the absolute path to the docker 
> config file. I only need the directory path, NOT the file path. 
>
> So if the DOCKER_CONFIG_PATH is something like 
> /jenkins/tmp/393939kdk/config.json , I need to set the DOCKER_CONFIG 
> environment variable to  /jenkins/tmp/393939kdk/
>
> Given all the security stuff that's built in to the groovy script, I 
> haven't been able to do this.
>
> My question boils down to this:  how do I get access to the variable 
> DOCKER_CONFIG_PATH that is pulled from the credentials.  I need to drop the 
> filename at the end off the string.
>
>
>
> Thanks
> phil
>

-- 
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 jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/632d912d-bcae-4829-bd6e-f36c60356f9d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Help with github plugin - SSL issue with custom CA

2016-08-16 Thread Cyrille Le Clerc
Hello Robert,

There is a trick here: your ssl certificate must be trusted by both your 
JVM and by the native "git" executable.

The native "git" executable picks its certificates from "/etc/ssl/certs/" 
on ubuntu, the folder should be similar on other linux distributions.
The default JVM SSL trust store is $JAVA_HOME/jre/lib/security/cacerts and, 
on OS like ubuntu, is a symlink to /etc/ssl/certs/java/cacerts

The following help page seem to detail well how to add 
certs: http://askubuntu.com/questions/73287/how-do-i-install-a-root-certificate

I like to use "jrunscript" to test the trust store of java virtual 
machines. If the invocation returns an http code, then the certificate is 
trusted by the JVM:

jrunscript -e "println(new java.net.URL(\"https://github.acme
\").openConnection().getResponseCode())"


Cyrille

On Tuesday, August 16, 2016 at 5:48:28 AM UTC+2, Robert Hafner wrote:
>
>
> I have a fresh install of Jenkins that will not connect to my Github 
> Enterprise instance. We are using an in house CA with our custom TLD (so 
> https://github.acme) and aren't having any other SSL troubles outside of 
> this.
>
> Does anyone know if the CA certs need to be installed in a specific way 
> for Jenkins to be able to use them?
>
> Rob
>

-- 
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 jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/8c1340e3-22b3-4d1c-b796-dd071b482aa3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Pipeline Maven Plugin] Naming convention for the configuration attributes?

2016-08-16 Thread Cyrille Le Clerc
Hello,

I would like to have a discussion on the naming convention of the 
configuration attributes before we release the first "non experimental" 
version of the plugin.

I have identified the following configuration attributes:

   - jdk 
   - mavenInstallation
   - mavenLocalRepo
   - mavenSettingsConfig
   - mavenSettingsFilePath
   - mavenOpts
   
I like the "maven" prefix for all the attributes that are related to Maven.

I am not totally comfortable with the fact that we don't have the same 
convention for the two configuration attributes related to tool 
installations.
*For the installation of Maven, we suffix the configuration attribute name 
by "installation" using "mavenInstallation" when for the JDK, we don't use 
a suffix and we use the name "jdk".*

*Wouldn't it be more consistent to rename the attribute "jdk" into 
"jdkInstallation"?*

Cyrille

-- 
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 jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/8e0a4dcb-aea1-4304-8223-f7dcd1200de6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: New Pipeline Maven plugin

2016-08-15 Thread Cyrille Le Clerc
Hello ok999,

> Assuming maven was already installed in the node & have the files 
configured (settings.xml, local repo etc) from the TOOLS setting of 
jenkins.. 
> Will this plugin override those settings? 

Yes, "withMaven(){}" will override all the settings that you define with 
the wrapper. We do it creating a shell wrapper of the "mvn" / "mvn.bat" 
command.

If you specify a "jdk" with "withMaven(jdk: 'my-jdk'){}" then we will 
override "JAVA_HOME" and add this new "$JAVA_HOME/bin" to the "PATH"
If you specify a "mavenInstallation" then we will override "MAVEN_HOME", 
"M2_HOME", we will ensure that the "mvn" wrapper that we create with 
"withMaven()" points to this desired MAven installation.
If you specify a "mavenSettingsConfig", we will pass it as a "--settings" 
when invoking the "mvn" executable
If you specify a "mavenLocalRepo", we will pass the system property 
"-Dmaven.repo.local="

You can see all these details enabling a FINE logger on 
"org.jenkinsci.plugins.pipeline.maven.WithMavenStepExecution"

I have created a gist that details these 
https://gist.github.com/cyrille-leclerc/a9db59d346c937c8bdde2113df7653d5

> And is there any plan for the maven release plugin in pipeline? At the 
moment i am using the 'bat' to call the goals for release:prepare and 
release:perform   

We focus for the moment on covering as many Maven use cases as possible 
with the "withMaven(...){}" wrapper. We hope that a Maven execution step 
will appear soon.

I feel that a Maven release is already pretty straight forward with the 
"withMaven(...){}" wrapper. The following code actually works:

node {
> withMaven(mavenSettingsConfig: 'maven-settings-for-game-of-life', 
> mavenInstallation: 'M3', jdk: 'Oracle JDK 8') {
> git 'https://github.com/cyrille-leclerc/my-spring-boot-app.git'
> sh "mvn release:prepare release:perform"
> }
> }




On Thursday, August 11, 2016 at 10:06:31 PM UTC+2, ok999 wrote:
>
> Assuming maven was already installed in the node & have the files 
> configured (settings.xml, local repo etc) from the TOOLS setting of 
> jenkins.. 
> Will this plugin override those settings? 
>
>  withMaven(mavenInstallation: 'M3', mavenLocalRepo: '.repository', 
> mavenSettingsConfig: 'maven-settings-for-gameoflife') {
> // Run the maven buildsh "mvn clean install"
> }
>
>
>
> And is there any plan for the maven release plugin in pipeline? At the moment 
> i am using the 'bat' to call the goals for release:prepare and 
> release:perform   
>
>
>
> Thanks
>
>
>
>
>
>
> On Thu, Aug 11, 2016 at 11:33 AM, Álvaro Lobato  > wrote:
>
>>
>> Hello everyone,
>>
>> I'd like to introduce you to the new Pipeline Maven 
>>  plugin . 
>> The intention of this plugin is to help using maven from pipeline, setting 
>> up a maven environment by using a withMaven step. This environment can 
>> later be called with sh or bat step.
>>
>> The supported configuration parameters are:
>>
>>- Maven Installation
>>- JDK
>>- Maven Settings Config (Config File Provider Plugin)
>>- Maven Settings File Path 
>>- Maven JVM Opts 
>>- Maven Local Repository 
>>
>> The step can be used used directly on a node or in a docker.inside.
>>
>> Currently it is in an early stage of development and I've just released 
>> the first beta version, already available in the update center.
>>
>> This is the start point for a more feature rich integration between 
>> pipeline and maven.
>>
>> You can find more information on the wiki page: Pipeline Maven plugin 
>>  
>>
>> Thanks
>> Alvaro.
>>
>> -- 
>> 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 jenkinsci-use...@googlegroups.com .
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/jenkinsci-users/81089a41-3bdf-47a4-bdad-b4424d27341b%40googlegroups.com
>>  
>> 
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> -- 
> Regards
> nirish okram
>

-- 
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 jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/e5d55996-1800-4696-8e7b-f4f14f43d4f6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: New Pipeline Maven plugin

2016-08-15 Thread Cyrille Le Clerc
Hello Will,

Fingerprint and reports rendering are things we would like to see in 
forthcoming releases of this plugin. We hope that the community will help 
on this kind of feature.

For the moment, we unfortunately have to use the following verbose steps:

step([$class: 'ArtifactArchiver', artifacts: 'gameoflife-web/target/*.war'])
step([$class: 'WarningsPublisher', consoleParsers: [[parserName: 'Maven']]])
step([$class: 'JUnitResultArchiver', testResults: 
'**/target/surefire-reports/TEST-*.xml'])
step([$class: 'JavadocArchiver', javadocDir: 
'gameoflife-core/target/site/apidocs/'])
...

Cyrille

On Saturday, August 13, 2016 at 1:43:37 AM UTC+2, Will Currie wrote:
>
> Nice. It seems to non-pipeline/'old-school'/regular jenkins maven build 
> has support for tracking fingerprints of artefacts used and produced by any 
> given maven build. I'm taking about the work that seems to be done by 
> MavenFingerprinter 
> .
>  
> If I understand correctly this allows you to see builds upstream and 
> downstream of any given maven build.
>
> Any thoughts on how this might fit into the pipeline builds? The pipeline 
> tutorial shows how to configure fingerprints for build outputs 
> (**/target/*.jar). It doesn't seem to cover tracking fingerprints for what 
> it consumes.
>
> Thanks.
>
> On Friday, 12 August 2016 02:33:19 UTC+10, Álvaro Lobato wrote:
>>
>>
>> Hello everyone,
>>
>> I'd like to introduce you to the new Pipeline Maven 
>>  plugin . 
>> The intention of this plugin is to help using maven from pipeline, setting 
>> up a maven environment by using a withMaven step. This environment can 
>> later be called with sh or bat step.
>>
>> The supported configuration parameters are:
>>
>>- Maven Installation
>>- JDK
>>- Maven Settings Config (Config File Provider Plugin)
>>- Maven Settings File Path 
>>- Maven JVM Opts 
>>- Maven Local Repository 
>>
>> The step can be used used directly on a node or in a docker.inside.
>>
>> Currently it is in an early stage of development and I've just released 
>> the first beta version, already available in the update center.
>>
>> This is the start point for a more feature rich integration between 
>> pipeline and maven.
>>
>> You can find more information on the wiki page: Pipeline Maven plugin 
>>  
>>
>> Thanks
>> Alvaro.
>>
>

-- 
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 jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/5528fdcb-f9a1-4af5-ad6f-c94fac2e20cf%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[jenkins-workflow] How to inject a password in an "sh" step? Credentials Binding Plugin?

2015-01-19 Thread Cyrille Le Clerc
Dear community,

Could someone explain me how to retrieve in a Jenkins workflow a password 
that has been declared as a username/password in the Jenkins Credentials 
store?

Is it possible to use the Credentials Binding Plugin 
 in 
a workflow? Does this plugin need to be updated to work in a workflow?

Cyrille

-- 
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 jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/a327274a-67b4-4f7d-a42c-537692c39d0c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.