Re: Deadlock running out of executors waiting on subjobs via parameterized trigger plugin

2021-04-09 Thread Kitu
Hi,


were able to find some solution on this?

Thanks

On Monday, 23 February 2015 at 21:03:25 UTC+5:30 bscr...@phxlabs.ca wrote:

>
> I was hoping to avoid having to create new workspaces and add archiving 
> and restoring artifacts as it is gigs of data (sadly even incrementals), 
> especially since C & D are relatively small and fast in comparison.
>
> With the locks though that would prevent them from running concurrently 
> unnecessarily, correct? I would also have to do this for all jobs that 
> involve more than one job as well to ensure they are unique as I add more.  
> Is it not possible to pass the "executor baton" to a sub-job when waiting 
> and restore it on completion?
>
> Thank you for taking the time to follow up on this!
> Brent
>
> On Tue, Feb 17, 2015 at 9:24 AM, Ginga, Dick  
> wrote:
>
>> You can use 2 locks, one locks A from running until B completes and one 
>> for C and D.
>>
>>  
>>
>> In a different approach, IF C and D ONLY need the built artifacts from A 
>> and B, then you can have A and B “archive the artifacts” and then have C 
>> and D “Copy the artifacts” into their workspace and run the tests. 
>>
>>  
>>
>> *From:* jenkins...@googlegroups.com [mailto:jenkins...@googlegroups.com] *On 
>> Behalf Of *Brent Scriver
>> *Sent:* Tuesday, February 17, 2015 9:16 AM
>>
>> *To:* jenkins...@googlegroups.com
>> *Subject:* Re: Deadlock running out of executors waiting on subjobs via 
>> parameterized trigger plugin
>>
>>  
>>
>>  
>>
>> Hmm, if I do that, while it remedies the deadlock, it means I no longer 
>> can have multiple runs in parallel in different workspaces, correct?
>>
>>  
>>
>> On Tue, Feb 17, 2015 at 9:10 AM, Ginga, Dick  
>> wrote:
>>
>> You can use locks to prevent them from running again via the Lock and 
>> Latches plugin or maybe the Block build when downstream project is 
>> building under advanced project options will work. I have used the first 
>> but not the second.
>>
>>  
>>
>> *From:* jenkins...@googlegroups.com [mailto:jenkins...@googlegroups.com] *On 
>> Behalf Of *Brent Scriver
>> *Sent:* Tuesday, February 17, 2015 9:02 AM
>> *To:* jenkins...@googlegroups.com
>> *Subject:* Re: Deadlock running out of executors waiting on subjobs via 
>> parameterized trigger plugin
>>
>>  
>>
>>  
>>
>> Unfortunately I do need A & B to wait to make sure A & B do not run again 
>> until C & D are done with those workspaces.
>>
>>  
>>
>> On Tue, Feb 17, 2015 at 7:54 AM, Ginga, Dick  
>> wrote:
>>
>> If you do not need A and B to wait for C and D to complete, then trigger 
>> them using a post-build trigger using the Trigger Parameterized Build 
>> plugin. This will run before A completes but not cause A to wait. Then an 
>> executor will become available as A terminates
>>
>>  
>>
>> *From:* jenkins...@googlegroups.com [mailto:jenkins...@googlegroups.com] *On 
>> Behalf Of *Brent Scriver
>> *Sent:* Friday, February 13, 2015 4:27 PM
>> *To:* jenkins...@googlegroups.com
>> *Subject:* Deadlock running out of executors waiting on subjobs via 
>> parameterized trigger plugin
>>
>>  
>>
>>  
>>
>> I'm looking for some help/direction at resolving an odd problem.  We 
>> currently only have one node (still in the midst of setting up/configuring 
>> hardware), and we encountered a scenario where we have just a couple 
>> executors that can run on the machine at once (say 2).  If I start jobs A & 
>> B which run jobs C & D via the parameterized trigger plugin and wait for 
>> those to complete, no jobs ever finish.  C & D are never started due to 
>> lack of executors and A & B cannot complete waiting for those jobs.
>>
>>  
>>
>> We are using Perforce and I am trying to be efficient with workspaces as 
>> syncing new workspaces is really expensive (we are already at gigs of data) 
>> part of the objective is to reuse the workspace between the jobs (so C & D 
>> can run within the workspaces set up by A & B).
>>
>>  
>>
>> Is there a detail I'm missing?  None of the jobs are set up to block 
>> waiting for upstream or downstream jobs to finish.
>>
>>  
>>
>> I'm on (with versions of job related plugins in case there is an 
>> interaction):
>>
>> * Jenkins 1.592
>>
>> * Build Pipeline Plugin 1.4.5
>>
>> * External Job Monitor Plugin 1,4
>>
>> * Join Plugin 1.15
>>
>> * Matrix Project Plugin 1.4
>>
>> * Node & Label Parameter Plugin 1.5.1
>>
>> * Parameterized Trigger Plugin 2.25
>>
>>  
>>
>> I did have the job weight plugin at one point, but no longer.
>>
>>  
>>
>>  
>>
>> -- 
>> 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/1fc6b4ef-f34d-4e45-a4aa-96e22cb57a79%40googlegroups.com
>>  
>> 

is there a way to see all the available methods of a plugin in Jenkins?

2021-04-09 Thread jesus fernandez
I am learning Jenkins on my own and I am trying to learn about plugins. I 
have a stage to send an email with the cppcheck results with a template I 
found 
https://stackoverflow.com/questions/13888338/sending-cppcheck-result-report-on-email-from-jenkins-using-email-ext-plugin
 
the template instantiate the ```CppcheckBuildAction``` and access its 
methods, what I would like to know if is possible to check what methods are 
avaialable for that instance and if possible how / where I can see them.
Also how could I for example echo / println one of them. For instance in 
the template provided in the link above it acces the total number of errors 
with ${cppcheckResult.report.getNumberTotal()} but if I echo it I get an 
error ```groovy.lang.MissingPropertyException: No such property: 
cppcheckResult for class: groovy.lang.Binding```, this is what I tried
stage('Email') {
steps {
script{
publishCppcheck pattern:'cppcheck.xml'
emailext( subject: 'foo', to: 'm...@mail.net', body: '${JELLY_SCRIPT, 
template="custom"}')
}
echo "${cppcheckResult.report.getNumberTotal()}"
}
}
my final goal actually is to send the email just when the report find a new 
error so I was thinking to save the total number of errors in an external 
file and compare it with each build and if the number is bigger send the 
email, is there any native / easier way to do this?

-- 
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/901e41a0-e2ec-466c-87a9-23d6082897e1n%40googlegroups.com.


Re: Can I send cppcheck results through slack in a jenkins pipeline?

2021-04-09 Thread Ullrich Hafner
Exporting results from one plugin into another plugin is definitely possible. 
You typically have two steps:
1) Export the data from a producer plugin
a) using Tokens
b) using API methods of the plugin
2) Import the data (or reformat and aggregate it) into a consumer plugin

For step 1 I can say this works for the warnings plugin, it can export the 
results of CppCheck either into tokens or into objects (that you can process 
using your pipeline). 

I have no idea if the slack plugin is capable of doing step 2 though, but I 
would assume that it works in that way...

> Am 09.04.2021 um 08:39 schrieb jesus fernandez :
> 
> I just started using cppcheck, and I was wondering if there is any way to 
> access to the report values (for instance number of total errors) and send it 
> to slack. I have been searching in the documentation and here in SO but I 
> have found nothing, as I just have been using Jenkins for a couple of months 
> ( I am a junior dev) I was wondering if somebody know if this is possible and 
> could drive me in the right direction.
> 
> -- 
> 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/d3aee90e-5331-480f-84d7-4df7c3ebcf6fn%40googlegroups.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/C816645C-24B7-4FEC-830F-7312BA7E6153%40gmail.com.


Re: is there a way to see all the available methods of a plugin in Jenkins?

2021-04-09 Thread Ullrich Hafner
You need to read the code of the plugin. I.e., the model of the producer plugin.


> Am 09.04.2021 um 13:08 schrieb jesus fernandez :
> 
> I am learning Jenkins on my own and I am trying to learn about plugins. I 
> have a stage to send an email with the cppcheck results with a template I 
> found 
> https://stackoverflow.com/questions/13888338/sending-cppcheck-result-report-on-email-from-jenkins-using-email-ext-plugin
>  
> 
>  the template instantiate the ```CppcheckBuildAction``` and access its 
> methods, what I would like to know if is possible to check what methods are 
> avaialable for that instance and if possible how / where I can see them.
> Also how could I for example echo / println one of them. For instance in the 
> template provided in the link above it acces the total number of errors with 
> ${cppcheckResult.report.getNumberTotal()} but if I echo it I get an error 
> ```groovy.lang.MissingPropertyException: No such property: cppcheckResult for 
> class: groovy.lang.Binding```, this is what I tried
> stage('Email') {
> steps {
> script{
> publishCppcheck pattern:'cppcheck.xml'
> emailext( subject: 'foo', to: 'm...@mail.net', body: '${JELLY_SCRIPT, 
> template="custom"}')
> }
> echo "${cppcheckResult.report.getNumberTotal()}"
> }
> }
> my final goal actually is to send the email just when the report find a new 
> error so I was thinking to save the total number of errors in an external 
> file and compare it with each build and if the number is bigger send the 
> email, is there any native / easier way to do this?
> 
> -- 
> 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/901e41a0-e2ec-466c-87a9-23d6082897e1n%40googlegroups.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/DE30733C-EF0D-4D21-B61C-BC6137A2CDF4%40gmail.com.


Re: is there a way to see all the available methods of a plugin in Jenkins?

2021-04-09 Thread jesus fernandez
Thanks for asering. I have been checking the javadoc of the 
plugin https://javadoc.jenkins.io/plugin/email-ext/ but my java knowledge 
is super basic and I do not get to see where the methods available to 
Jenkins are. So I guess this is too advanced for me ATM

El viernes, 9 de abril de 2021 a las 13:48:03 UTC+2, ullrich...@gmail.com 
escribió:

> You need to read the code of the plugin. I.e., the model of the producer 
> plugin.
>
>
> Am 09.04.2021 um 13:08 schrieb jesus fernandez :
>
> I am learning Jenkins on my own and I am trying to learn about plugins. I 
> have a stage to send an email with the cppcheck results with a template I 
> found 
> https://stackoverflow.com/questions/13888338/sending-cppcheck-result-report-on-email-from-jenkins-using-email-ext-plugin
>  
> the template instantiate the ```CppcheckBuildAction``` and access its 
> methods, what I would like to know if is possible to check what methods are 
> avaialable for that instance and if possible how / where I can see them.
> Also how could I for example echo / println one of them. For instance in 
> the template provided in the link above it acces the total number of errors 
> with ${cppcheckResult.report.getNumberTotal()} but if I echo it I get an 
> error ```groovy.lang.MissingPropertyException: No such property: 
> cppcheckResult for class: groovy.lang.Binding```, this is what I tried
> stage('Email') {
> steps {
> script{
> publishCppcheck pattern:'cppcheck.xml'
> emailext( subject: 'foo', to: 'ma...@mail.net', body: '${JELLY_SCRIPT, 
> template="custom"}')
> }
> echo "${cppcheckResult.report.getNumberTotal()}"
> }
> }
> my final goal actually is to send the email just when the report find a 
> new error so I was thinking to save the total number of errors in an 
> external file and compare it with each build and if the number is bigger 
> send the email, is there any native / easier way to do this?
>
> -- 
> 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/901e41a0-e2ec-466c-87a9-23d6082897e1n%40googlegroups.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/48090815-12d1-4f8a-a15b-2d0c0185b830n%40googlegroups.com.


Re: Can I send cppcheck results through slack in a jenkins pipeline?

2021-04-09 Thread jesus fernandez
Thanks for replying, any documentation or link to guide me in the right 
direction on how to do it? I am quite Junior and have been learning Jenkins 
on my own

El viernes, 9 de abril de 2021 a las 13:46:48 UTC+2, ullrich...@gmail.com 
escribió:

> Exporting results from one plugin into another plugin is definitely 
> possible. You typically have two steps:
> 1) Export the data from a producer plugin
> a) using Tokens
> b) using API methods of the plugin
> 2) Import the data (or reformat and aggregate it) into a consumer plugin
>
> For step 1 I can say this works for the warnings plugin, it can export the 
> results of CppCheck either into tokens or into objects (that you can 
> process using your pipeline). 
>
> I have no idea if the slack plugin is capable of doing step 2 though, but 
> I would assume that it works in that way...
>
> Am 09.04.2021 um 08:39 schrieb jesus fernandez :
>
> I just started using cppcheck, and I was wondering if there is any way to 
> access to the report values (for instance number of total errors) and send 
> it to slack. I have been searching in the documentation and here in SO but 
> I have found nothing, as I just have been using Jenkins for a couple of 
> months ( I am a junior dev) I was wondering if somebody know if this is 
> possible and could drive me in the right direction.
>
> -- 
> 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/d3aee90e-5331-480f-84d7-4df7c3ebcf6fn%40googlegroups.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/abdfdbec-e2cf-4f69-a089-1cb93dcef30en%40googlegroups.com.


Re: Can I send cppcheck results through slack in a jenkins pipeline?

2021-04-09 Thread Ullrich Hafner
https://github.com/jenkinsci/warnings-ng-plugin/blob/master/doc/Documentation.md#token-macro-support

> Am 09.04.2021 um 13:59 schrieb jesus fernandez :
> 
> Thanks for replying, any documentation or link to guide me in the right 
> direction on how to do it? I am quite Junior and have been learning Jenkins 
> on my own
> 
> El viernes, 9 de abril de 2021 a las 13:46:48 UTC+2, ullrich...@gmail.com 
> escribió:
> Exporting results from one plugin into another plugin is definitely possible. 
> You typically have two steps:
> 1) Export the data from a producer plugin
> a) using Tokens
> b) using API methods of the plugin
> 2) Import the data (or reformat and aggregate it) into a consumer plugin
> 
> For step 1 I can say this works for the warnings plugin, it can export the 
> results of CppCheck either into tokens or into objects (that you can process 
> using your pipeline). 
> 
> I have no idea if the slack plugin is capable of doing step 2 though, but I 
> would assume that it works in that way...
> 
> 
>> Am 09.04.2021 um 08:39 schrieb jesus fernandez > >:
>> 
> 
>> I just started using cppcheck, and I was wondering if there is any way to 
>> access to the report values (for instance number of total errors) and send 
>> it to slack. I have been searching in the documentation and here in SO but I 
>> have found nothing, as I just have been using Jenkins for a couple of months 
>> ( I am a junior dev) I was wondering if somebody know if this is possible 
>> and could drive me in the right direction.
>> 
> 
>> -- 
>> 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/d3aee90e-5331-480f-84d7-4df7c3ebcf6fn%40googlegroups.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/abdfdbec-e2cf-4f69-a089-1cb93dcef30en%40googlegroups.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/2AD3D6C2-F648-4CCC-8CB3-8672EB614ECA%40gmail.com.


Re: is there a way to see all the available methods of a plugin in Jenkins?

2021-04-09 Thread Ullrich Hafner
Are your projects located in GitHub? Then it would be quite easy to report 
results automatically using the GitHub checks plugin. Email is quite old-school 
when it comes to build result reporting... 

> Am 09.04.2021 um 13:58 schrieb jesus fernandez :
> 
> Thanks for asering. I have been checking the javadoc of the plugin 
> https://javadoc.jenkins.io/plugin/email-ext/ but my java knowledge is super 
> basic and I do not get to see where the methods available to Jenkins are. So 
> I guess this is too advanced for me ATM
> 
> El viernes, 9 de abril de 2021 a las 13:48:03 UTC+2, ullrich...@gmail.com 
> escribió:
> You need to read the code of the plugin. I.e., the model of the producer 
> plugin.
> 
> 
> 
>> Am 09.04.2021 um 13:08 schrieb jesus fernandez > >:
>> 
> 
>> I am learning Jenkins on my own and I am trying to learn about plugins. I 
>> have a stage to send an email with the cppcheck results with a template I 
>> found 
>> https://stackoverflow.com/questions/13888338/sending-cppcheck-result-report-on-email-from-jenkins-using-email-ext-plugin
>>  
>> 
>>  the template instantiate the ```CppcheckBuildAction``` and access its 
>> methods, what I would like to know if is possible to check what methods are 
>> avaialable for that instance and if possible how / where I can see them.
>> Also how could I for example echo / println one of them. For instance in the 
>> template provided in the link above it acces the total number of errors with 
>> ${cppcheckResult.report.getNumberTotal()} but if I echo it I get an error 
>> ```groovy.lang.MissingPropertyException: No such property: cppcheckResult 
>> for class: groovy.lang.Binding```, this is what I tried
>> stage('Email') {
>> steps {
>> script{
>> publishCppcheck pattern:'cppcheck.xml'
>> emailext( subject: 'foo', to: 'ma...@mail.net 
>> ', body: 
>> '${JELLY_SCRIPT, template="custom"}')
>> }
>> echo "${cppcheckResult.report.getNumberTotal()}"
>> }
>> }
>> my final goal actually is to send the email just when the report find a new 
>> error so I was thinking to save the total number of errors in an external 
>> file and compare it with each build and if the number is bigger send the 
>> email, is there any native / easier way to do this?
>> 
> 
>> -- 
>> 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/901e41a0-e2ec-466c-87a9-23d6082897e1n%40googlegroups.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/48090815-12d1-4f8a-a15b-2d0c0185b830n%40googlegroups.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/AFDA6FF8-B7DF-4DAA-A046-7E063DC41E53%40gmail.com.


Re: is there a way to see all the available methods of a plugin in Jenkins?

2021-04-09 Thread jesus fernandez
my projects are in Perforce. What if I want to acces to one of those 
properties which I know are available from looking at the jelly template, 
for instance ${cppcheckResult.getDiff().getNumberNoCategorySeverity()} I 
tried to echo that property but I get an error how could I access to it?
this is the jelly template I am using (I took it from SO)


  




  Summary

#cppcheckStatistics { width: auto; }
#cppcheckStatistics .number { text-align: right; }


  

  Severity
  Count
  Delta

  
  

  Error
  ${cppcheckResult.statistics.getNumberErrorSeverity()}
  ${cppcheckResult.getDiff().getNumberErrorSeverity()}


  Warning
  ${cppcheckResult.statistics.getNumberWarningSeverity()}
  ${cppcheckResult.getDiff().getNumberWarningSeverity()}


  Style
  ${cppcheckResult.statistics.getNumberStyleSeverity()}
  ${cppcheckResult.getDiff().getNumberStyleSeverity()}


  Performance
  ${cppcheckResult.statistics.getNumberPerformanceSeverity()}
  ${cppcheckResult.getDiff().getNumberPerformanceSeverity()}


  Portability
  ${cppcheckResult.statistics.getNumberPortabilitySeverity()}
  ${cppcheckResult.getDiff().getNumberPortabilitySeverity()}


  Information
  ${cppcheckResult.statistics.getNumberInformationSeverity()}
  ${cppcheckResult.getDiff().getNumberInformationSeverity()}


  No category
  ${cppcheckResult.statistics.getNumberNoCategorySeverity()}
  ${cppcheckResult.getDiff().getNumberNoCategorySeverity()}

  
  

  Total
  ${cppcheckResult.report.getNumberTotal()}
  ${cppcheckResult.getDiff().getNumberTotal()}

  

  

 
 


El viernes, 9 de abril de 2021 a las 14:27:16 UTC+2, ullrich...@gmail.com 
escribió:

> Are your projects located in GitHub? Then it would be quite easy to report 
> results automatically using the GitHub checks plugin. Email is quite 
> old-school when it comes to build result reporting... 
>
> Am 09.04.2021 um 13:58 schrieb jesus fernandez :
>
> Thanks for asering. I have been checking the javadoc of the plugin 
> https://javadoc.jenkins.io/plugin/email-ext/ but my java knowledge is 
> super basic and I do not get to see where the methods available to Jenkins 
> are. So I guess this is too advanced for me ATM
>
> El viernes, 9 de abril de 2021 a las 13:48:03 UTC+2, ullrich...@gmail.com 
> escribió:
>
>> You need to read the code of the plugin. I.e., the model of the producer 
>> plugin.
>>
>>
>> Am 09.04.2021 um 13:08 schrieb jesus fernandez :
>>
>> I am learning Jenkins on my own and I am trying to learn about plugins. I 
>> have a stage to send an email with the cppcheck results with a template I 
>> found 
>> https://stackoverflow.com/questions/13888338/sending-cppcheck-result-report-on-email-from-jenkins-using-email-ext-plugin
>>  
>> the template instantiate the ```CppcheckBuildAction``` and access its 
>> methods, what I would like to know if is possible to check what methods are 
>> avaialable for that instance and if possible how / where I can see them.
>> Also how could I for example echo / println one of them. For instance in 
>> the template provided in the link above it acces the total number of errors 
>> with ${cppcheckResult.report.getNumberTotal()} but if I echo it I get an 
>> error ```groovy.lang.MissingPropertyException: No such property: 
>> cppcheckResult for class: groovy.lang.Binding```, this is what I tried
>> stage('Email') {
>> steps {
>> script{
>> publishCppcheck pattern:'cppcheck.xml'
>> emailext( subject: 'foo', to: 'ma...@mail.net', body: '${JELLY_SCRIPT, 
>> template="custom"}')
>> }
>> echo "${cppcheckResult.report.getNumberTotal()}"
>> }
>> }
>> my final goal actually is to send the email just when the report find a 
>> new error so I was thinking to save the total number of errors in an 
>> external file and compare it with each build and if the number is bigger 
>> send the em

Re: is there a way to see all the available methods of a plugin in Jenkins?

2021-04-09 Thread Ullrich Hafner
First of all: are you using the warnings-ng plugin or the cppcheck plugin in 
your build? They use different models. 

I’m not sure if there is an easy way to debug email ext templates in the 
meantime, I am not using it actively. 
But you can simply start with a subset of the script below and check which 
values produce a result and which not. 

> Am 09.04.2021 um 14:32 schrieb jesus fernandez :
> 
> my projects are in Perforce. What if I want to acces to one of those 
> properties which I know are available from looking at the jelly template, for 
> instance ${cppcheckResult.getDiff().getNumberNoCategorySeverity()} I tried to 
> echo that property but I get an error how could I access to it?
> this is the jelly template I am using (I took it from SO)
> 
> 
>   
>  value="${it.getAction('org.jenkinsci.plugins.cppcheck.CppcheckBuildAction')}" 
> />
> 
>  />
> 
>   Summary
> 
> #cppcheckStatistics { width: auto; }
> #cppcheckStatistics .number { text-align: right; }
> 
> 
>   
> 
>   Severity
>   Count
>   Delta
> 
>   
>   
> 
>   Error
>   ${cppcheckResult.statistics.getNumberErrorSeverity()}
>   ${cppcheckResult.getDiff().getNumberErrorSeverity()}
> 
> 
>   Warning
>   ${cppcheckResult.statistics.getNumberWarningSeverity()}
>   ${cppcheckResult.getDiff().getNumberWarningSeverity()}
> 
> 
>   Style
>   ${cppcheckResult.statistics.getNumberStyleSeverity()}
>   ${cppcheckResult.getDiff().getNumberStyleSeverity()}
> 
> 
>   Performance
>   ${cppcheckResult.statistics.getNumberPerformanceSeverity()}
>   ${cppcheckResult.getDiff().getNumberPerformanceSeverity()}
> 
> 
>   Portability
>   ${cppcheckResult.statistics.getNumberPortabilitySeverity()}
>   ${cppcheckResult.getDiff().getNumberPortabilitySeverity()}
> 
> 
>   Information
>   ${cppcheckResult.statistics.getNumberInformationSeverity()}
>   ${cppcheckResult.getDiff().getNumberInformationSeverity()}
> 
> 
>   No category
>   ${cppcheckResult.statistics.getNumberNoCategorySeverity()}
>   ${cppcheckResult.getDiff().getNumberNoCategorySeverity()}
> 
>   
>   
> 
>   Total
>href="${rooturl}${build.url}cppcheckResult">${cppcheckResult.report.getNumberTotal()}
>href="${rooturl}${build.url}cppcheckResult/source.all/?before=5&after=5&states=new">${cppcheckResult.getDiff().getNumberTotal()}
> 
>   
> 
>   
> 
>  
>  
> 
> 
> El viernes, 9 de abril de 2021 a las 14:27:16 UTC+2, ullrich...@gmail.com 
> escribió:
> Are your projects located in GitHub? Then it would be quite easy to report 
> results automatically using the GitHub checks plugin. Email is quite 
> old-school when it comes to build result reporting... 
> 
> 
>> Am 09.04.2021 um 13:58 schrieb jesus fernandez > >:
>> 
> 
>> Thanks for asering. I have been checking the javadoc of the plugin 
>> https://javadoc.jenkins.io/plugin/email-ext/ 
>>  but my java knowledge is 
>> super basic and I do not get to see where the methods available to Jenkins 
>> are. So I guess this is too advanced for me ATM
>> 
>> El viernes, 9 de abril de 2021 a las 13:48:03 UTC+2, ullrich...@gmail.com 
>>  escribió:
>> You need to read the code of the plugin. I.e., the model of the producer 
>> plugin.
>> 
>> 
>> 
>>> Am 09.04.2021 um 13:08 schrieb jesus fernandez >:
>>> 
>> 
>>> I am learning Jenkins on my own and I am trying to learn about plugins. I 
>>> have a stage to send an email with the cppcheck results with a template I 
>>> found 
>>> https://stackoverflow.com/questions/13888338/sending-cppcheck-result-report-on-email-from-jenkins-using-email-ext-plugin
>>>  
>>> 
>>>  the template instantiate the ```CppcheckBuildAction``` and access its 
>>> method

Re: is there a way to see all the available methods of a plugin in Jenkins?

2021-04-09 Thread jesus fernandez

I actually have tried both to publish the result, have not decided which 
one to use yet, any suggestion? I like the dashboard of the warnings-ng 
better, but I ilke from the publushcpp that you can see the line where the 
error is right from Jenkins without need to open the editor and look for 
the line...
El viernes, 9 de abril de 2021 a las 14:40:34 UTC+2, ullrich...@gmail.com 
escribió:

> First of all: are you using the warnings-ng plugin or the cppcheck plugin 
> in your build? They use different models. 
>
> I’m not sure if there is an easy way to debug email ext templates in the 
> meantime, I am not using it actively. 
> But you can simply start with a subset of the script below and check which 
> values produce a result and which not. 
>
> Am 09.04.2021 um 14:32 schrieb jesus fernandez :
>
> my projects are in Perforce. What if I want to acces to one of those 
> properties which I know are available from looking at the jelly template, 
> for instance ${cppcheckResult.getDiff().getNumberNoCategorySeverity()} I 
> tried to echo that property but I get an error how could I access to it?
> this is the jelly template I am using (I took it from SO)
>  xmlns:d="jelly:define">
> 
>   
>  value="${it.getAction('org.jenkinsci.plugins.cppcheck.CppcheckBuildAction')}" 
> />
> 
>  value="${cppcheckAction.getResult()}" />
> 
>   Summary
> 
> #cppcheckStatistics { width: auto; }
> #cppcheckStatistics .number { text-align: right; }
> 
> 
>   
> 
>   Severity
>   Count
>   Delta
> 
>   
>   
> 
>   Error
>   ${cppcheckResult.statistics.getNumberErrorSeverity()}
>   ${cppcheckResult.getDiff().getNumberErrorSeverity()}
> 
> 
>   Warning
>   ${cppcheckResult.statistics.getNumberWarningSeverity()}
>   ${cppcheckResult.getDiff().getNumberWarningSeverity()}
> 
> 
>   Style
>   ${cppcheckResult.statistics.getNumberStyleSeverity()}
>   ${cppcheckResult.getDiff().getNumberStyleSeverity()}
> 
> 
>   Performance
>   ${cppcheckResult.statistics.getNumberPerformanceSeverity()}
>   ${cppcheckResult.getDiff().getNumberPerformanceSeverity()}
> 
> 
>   Portability
>   ${cppcheckResult.statistics.getNumberPortabilitySeverity()}
>   ${cppcheckResult.getDiff().getNumberPortabilitySeverity()}
> 
> 
>   Information
>   ${cppcheckResult.statistics.getNumberInformationSeverity()}
>   ${cppcheckResult.getDiff().getNumberInformationSeverity()}
> 
> 
>   No category
>   ${cppcheckResult.statistics.getNumberNoCategorySeverity()}
>   ${cppcheckResult.getDiff().getNumberNoCategorySeverity()}
> 
>   
>   
> 
>   Total
>href="${rooturl}${build.url}cppcheckResult">${cppcheckResult.report.getNumberTotal()}
>href="${rooturl}${build.url}cppcheckResult/source.all/?before=5&after=5&states=new">${cppcheckResult.getDiff().getNumberTotal()}
> 
>   
> 
>   
> 
>  
>  
> 
>
> El viernes, 9 de abril de 2021 a las 14:27:16 UTC+2, ullrich...@gmail.com 
> escribió:
>
>> Are your projects located in GitHub? Then it would be quite easy to 
>> report results automatically using the GitHub checks plugin. Email is quite 
>> old-school when it comes to build result reporting... 
>>
>> Am 09.04.2021 um 13:58 schrieb jesus fernandez :
>>
>> Thanks for asering. I have been checking the javadoc of the plugin 
>> https://javadoc.jenkins.io/plugin/email-ext/ but my java knowledge is 
>> super basic and I do not get to see where the methods available to Jenkins 
>> are. So I guess this is too advanced for me ATM
>>
>> El viernes, 9 de abril de 2021 a las 13:48:03 UTC+2, ullrich...@gmail.com 
>> escribió:
>>
>>> You need to read the code of the plugin. I.e., the model of the producer 
>>> plugin.
>>>
>>>
>>> Am 09.04.2021 um 13:08 schrieb jesus fernandez :
>>>
>>> I am learning Jenkins on my own and I am trying to learn about plugins. 
>>> I have a stage to send an email with the cpp

Re: is there a way to see all the available methods of a plugin in Jenkins?

2021-04-09 Thread Ullrich Hafner
> 
> 
> I actually have tried both to publish the result,

But the object model of both is different, you need to choose the correct one 
in the email template!

> have not decided which one to use yet, any suggestion?

I am biased as I am the author of the warnings plugin ;-)

> I like the dashboard of the warnings-ng better, but I ilke from the 
> publushcpp that you can see the line where the error is right from Jenkins 
> without need to open the editor and look for the line...

This could be done in the warnings plugin as well.
Example: 
https://ci.jenkins.io/job/Plugins/job/analysis-model/job/master/1150/pmd/source.6e8cd82c-d953-4e48-9163-87d374ee6241/#32
 



> El viernes, 9 de abril de 2021 a las 14:40:34 UTC+2, ullrich...@gmail.com 
> escribió:
> First of all: are you using the warnings-ng plugin or the cppcheck plugin in 
> your build? They use different models. 
> 
> I’m not sure if there is an easy way to debug email ext templates in the 
> meantime, I am not using it actively. 
> But you can simply start with a subset of the script below and check which 
> values produce a result and which not. 
> 
> 
>> Am 09.04.2021 um 14:32 schrieb jesus fernandez > >:
>> 
> 
>> my projects are in Perforce. What if I want to acces to one of those 
>> properties which I know are available from looking at the jelly template, 
>> for instance ${cppcheckResult.getDiff().getNumberNoCategorySeverity()} I 
>> tried to echo that property but I get an error how could I access to it?
>> this is the jelly template I am using (I took it from SO)
>> > xmlns:d="jelly:define">
>> 
>>   
>> > value="${it.getAction('org.jenkinsci.plugins.cppcheck.CppcheckBuildAction')}"
>>  />
>> 
>> > value="${cppcheckAction.getResult()}" />
>> 
>>   Summary
>> 
>> #cppcheckStatistics { width: auto; }
>> #cppcheckStatistics .number { text-align: right; }
>> 
>> 
>>   
>> 
>>   Severity
>>   Count
>>   Delta
>> 
>>   
>>   
>> 
>>   Error
>>   ${cppcheckResult.statistics.getNumberErrorSeverity()}
>>   ${cppcheckResult.getDiff().getNumberErrorSeverity()}
>> 
>> 
>>   Warning
>>   ${cppcheckResult.statistics.getNumberWarningSeverity()}
>>   ${cppcheckResult.getDiff().getNumberWarningSeverity()}
>> 
>> 
>>   Style
>>   ${cppcheckResult.statistics.getNumberStyleSeverity()}
>>   ${cppcheckResult.getDiff().getNumberStyleSeverity()}
>> 
>> 
>>   Performance
>>   ${cppcheckResult.statistics.getNumberPerformanceSeverity()}
>>   ${cppcheckResult.getDiff().getNumberPerformanceSeverity()}
>> 
>> 
>>   Portability
>>   ${cppcheckResult.statistics.getNumberPortabilitySeverity()}
>>   ${cppcheckResult.getDiff().getNumberPortabilitySeverity()}
>> 
>> 
>>   Information
>>   ${cppcheckResult.statistics.getNumberInformationSeverity()}
>>   ${cppcheckResult.getDiff().getNumberInformationSeverity()}
>> 
>> 
>>   No category
>>   ${cppcheckResult.statistics.getNumberNoCategorySeverity()}
>>   ${cppcheckResult.getDiff().getNumberNoCategorySeverity()}
>> 
>>   
>>   
>> 
>>   Total
>>   > href="${rooturl}${build.url}cppcheckResult">${cppcheckResult.report.getNumberTotal()}
>>   > href="${rooturl}${build.url}cppcheckResult/source.all/?before=5&after=5&states=new">${cppcheckResult.getDiff().getNumberTotal()}
>> 
>>   
>> 
>>   
>> 
>>  
>>  
>> 
>> 
>> El viernes, 9 de abril de 2021 a las 14:27:16 UTC+2, ullrich...@gmail.com 
>>  escribió:
>> Are your projects located in GitHub? Then it would be quite easy to report 
>> results automatically using the GitHub checks plugin. Email is quite 
>> old-school when it comes to build result reporting... 
>> 
>> 
>>> Am 09.04.2021 um 13:58 schrieb jesus fernandez >:
>>> 
>> 
>>> Thanks for asering. I have b

Re: is there a way to see all the available methods of a plugin in Jenkins?

2021-04-09 Thread jesus fernandez
hahaha oh gosh I should have known I watched your video on youtube a few 
days ago. 

El viernes, 9 de abril de 2021 a las 15:39:30 UTC+2, ullrich...@gmail.com 
escribió:

>
>
> I actually have tried both to publish the result, 
>
>
> But the object model of both is different, you need to choose the correct 
> one in the email template!
>
> have not decided which one to use yet, any suggestion? 
>
>
> I am biased as I am the author of the warnings plugin ;-)
>
> I like the dashboard of the warnings-ng better, but I ilke from the 
> publushcpp that you can see the line where the error is right from Jenkins 
> without need to open the editor and look for the line...
>
>
> This could be done in the warnings plugin as well.
> Example: 
> https://ci.jenkins.io/job/Plugins/job/analysis-model/job/master/1150/pmd/source.6e8cd82c-d953-4e48-9163-87d374ee6241/#32
>
>
> El viernes, 9 de abril de 2021 a las 14:40:34 UTC+2, ullrich...@gmail.com 
> escribió:
>
>> First of all: are you using the warnings-ng plugin or the cppcheck plugin 
>> in your build? They use different models. 
>>
>> I’m not sure if there is an easy way to debug email ext templates in the 
>> meantime, I am not using it actively. 
>> But you can simply start with a subset of the script below and check 
>> which values produce a result and which not. 
>>
>> Am 09.04.2021 um 14:32 schrieb jesus fernandez :
>>
>> my projects are in Perforce. What if I want to acces to one of those 
>> properties which I know are available from looking at the jelly template, 
>> for instance ${cppcheckResult.getDiff().getNumberNoCategorySeverity()} I 
>> tried to echo that property but I get an error how could I access to it?
>> this is the jelly template I am using (I took it from SO)
>> > xmlns:d="jelly:define">
>> 
>>   
>> > value="${it.getAction('org.jenkinsci.plugins.cppcheck.CppcheckBuildAction')}"
>>  
>> />
>> 
>> > value="${cppcheckAction.getResult()}" />
>> 
>>   Summary
>> 
>> #cppcheckStatistics { width: auto; }
>> #cppcheckStatistics .number { text-align: right; }
>> 
>> 
>>   
>> 
>>   Severity
>>   Count
>>   Delta
>> 
>>   
>>   
>> 
>>   Error
>>   ${cppcheckResult.statistics.getNumberErrorSeverity()}
>>   ${cppcheckResult.getDiff().getNumberErrorSeverity()}
>> 
>> 
>>   Warning
>>   ${cppcheckResult.statistics.getNumberWarningSeverity()}
>>   ${cppcheckResult.getDiff().getNumberWarningSeverity()}
>> 
>> 
>>   Style
>>   ${cppcheckResult.statistics.getNumberStyleSeverity()}
>>   ${cppcheckResult.getDiff().getNumberStyleSeverity()}
>> 
>> 
>>   Performance
>>   ${cppcheckResult.statistics.getNumberPerformanceSeverity()}
>>   ${cppcheckResult.getDiff().getNumberPerformanceSeverity()}
>> 
>> 
>>   Portability
>>   ${cppcheckResult.statistics.getNumberPortabilitySeverity()}
>>   ${cppcheckResult.getDiff().getNumberPortabilitySeverity()}
>> 
>> 
>>   Information
>>   ${cppcheckResult.statistics.getNumberInformationSeverity()}
>>   ${cppcheckResult.getDiff().getNumberInformationSeverity()}
>> 
>> 
>>   No category
>>   ${cppcheckResult.statistics.getNumberNoCategorySeverity()}
>>   ${cppcheckResult.getDiff().getNumberNoCategorySeverity()}
>> 
>>   
>>   
>> 
>>   Total
>>   > href="${rooturl}${build.url}cppcheckResult">${cppcheckResult.report.getNumberTotal()}
>>   > href="${rooturl}${build.url}cppcheckResult/source.all/?before=5&after=5&states=new">${cppcheckResult.getDiff().getNumberTotal()}
>> 
>>   
>> 
>>   
>> 
>>  
>>  
>> 
>>
>> El viernes, 9 de abril de 2021 a las 14:27:16 UTC+2, ullrich...@gmail.com 
>> escribió:
>>
>>> Are your projects located in GitHub? Then it would be quite easy to 
>>> report results automatically using the GitHub checks plugin. Email is quite 
>>> old-school when it comes to build result reporting... 
>>>
>>> Am 09.04.2021 um 13:58 schrieb jesus

Re: is there a way to see all the available methods of a plugin in Jenkins?

2021-04-09 Thread jesus fernandez
but this is like god trying to explain something to a rock, I have just 
started in this world...hehehe

El viernes, 9 de abril de 2021 a las 15:40:44 UTC+2, jesus fernandez 
escribió:

> hahaha oh gosh I should have known I watched your video on youtube a few 
> days ago. 
>
> El viernes, 9 de abril de 2021 a las 15:39:30 UTC+2, ullrich...@gmail.com 
> escribió:
>
>>
>>
>> I actually have tried both to publish the result, 
>>
>>
>> But the object model of both is different, you need to choose the correct 
>> one in the email template!
>>
>> have not decided which one to use yet, any suggestion? 
>>
>>
>> I am biased as I am the author of the warnings plugin ;-)
>>
>> I like the dashboard of the warnings-ng better, but I ilke from the 
>> publushcpp that you can see the line where the error is right from Jenkins 
>> without need to open the editor and look for the line...
>>
>>
>> This could be done in the warnings plugin as well.
>> Example: 
>> https://ci.jenkins.io/job/Plugins/job/analysis-model/job/master/1150/pmd/source.6e8cd82c-d953-4e48-9163-87d374ee6241/#32
>>
>>
>> El viernes, 9 de abril de 2021 a las 14:40:34 UTC+2, ullrich...@gmail.com 
>> escribió:
>>
>>> First of all: are you using the warnings-ng plugin or the cppcheck 
>>> plugin in your build? They use different models. 
>>>
>>> I’m not sure if there is an easy way to debug email ext templates in the 
>>> meantime, I am not using it actively. 
>>> But you can simply start with a subset of the script below and check 
>>> which values produce a result and which not. 
>>>
>>> Am 09.04.2021 um 14:32 schrieb jesus fernandez :
>>>
>>> my projects are in Perforce. What if I want to acces to one of those 
>>> properties which I know are available from looking at the jelly template, 
>>> for instance ${cppcheckResult.getDiff().getNumberNoCategorySeverity()} I 
>>> tried to echo that property but I get an error how could I access to it?
>>> this is the jelly template I am using (I took it from SO)
>>> >> xmlns:d="jelly:define">
>>> 
>>>   
>>> >> value="${it.getAction('org.jenkinsci.plugins.cppcheck.CppcheckBuildAction')}"
>>>  
>>> />
>>> 
>>> >> value="${cppcheckAction.getResult()}" />
>>> 
>>>   Summary
>>> 
>>> #cppcheckStatistics { width: auto; }
>>> #cppcheckStatistics .number { text-align: right; }
>>> 
>>> 
>>>   
>>> 
>>>   Severity
>>>   Count
>>>   Delta
>>> 
>>>   
>>>   
>>> 
>>>   Error
>>>   ${cppcheckResult.statistics.getNumberErrorSeverity()}
>>>   ${cppcheckResult.getDiff().getNumberErrorSeverity()}
>>> 
>>> 
>>>   Warning
>>>   ${cppcheckResult.statistics.getNumberWarningSeverity()}
>>>   ${cppcheckResult.getDiff().getNumberWarningSeverity()}
>>> 
>>> 
>>>   Style
>>>   ${cppcheckResult.statistics.getNumberStyleSeverity()}
>>>   ${cppcheckResult.getDiff().getNumberStyleSeverity()}
>>> 
>>> 
>>>   Performance
>>>   ${cppcheckResult.statistics.getNumberPerformanceSeverity()}
>>>   ${cppcheckResult.getDiff().getNumberPerformanceSeverity()}
>>> 
>>> 
>>>   Portability
>>>   ${cppcheckResult.statistics.getNumberPortabilitySeverity()}
>>>   ${cppcheckResult.getDiff().getNumberPortabilitySeverity()}
>>> 
>>> 
>>>   Information
>>>   ${cppcheckResult.statistics.getNumberInformationSeverity()}
>>>   ${cppcheckResult.getDiff().getNumberInformationSeverity()}
>>> 
>>> 
>>>   No category
>>>   ${cppcheckResult.statistics.getNumberNoCategorySeverity()}
>>>   ${cppcheckResult.getDiff().getNumberNoCategorySeverity()}
>>> 
>>>   
>>>   
>>> 
>>>   Total
>>>   >> href="${rooturl}${build.url}cppcheckResult">${cppcheckResult.report.getNumberTotal()}
>>>   >> href="${rooturl}${build.url}cppcheckResult/source.all/?before=5&after=5&states=new">${cppcheckResult.getDiff().getNumberTotal()}
>>> 
>>>   
>>> 
>>>   
>>> 
>>>  
>>>  
>>> 
>>>
>>> El viernes, 9 de abril de 2021 a

Re: is there a way to see all the available methods of a plugin in Jenkins?

2021-04-09 Thread jesus fernandez
But the object model of both is different, you need to choose the 
correct one in the email template!

Yes, that template I am using it with publishcpp at the moment but I am not 
able to get the value of any of their properties within my pipeline like if 
I try to echo to check its value I get an error 
'groovy.lang.MissingPropertyException: No such property: cppcheckResult for 
class: groovy.lang.Binding' so I am stuck trying to get the total number of 
errors from each build

El viernes, 9 de abril de 2021 a las 15:41:22 UTC+2, jesus fernandez 
escribió:

> but this is like god trying to explain something to a rock, I have just 
> started in this world...hehehe
>
> El viernes, 9 de abril de 2021 a las 15:40:44 UTC+2, jesus fernandez 
> escribió:
>
>> hahaha oh gosh I should have known I watched your video on youtube a few 
>> days ago. 
>>
>> El viernes, 9 de abril de 2021 a las 15:39:30 UTC+2, ullrich...@gmail.com 
>> escribió:
>>
>>>
>>>
>>> I actually have tried both to publish the result, 
>>>
>>>
>>> But the object model of both is different, you need to choose the 
>>> correct one in the email template!
>>>
>>> have not decided which one to use yet, any suggestion? 
>>>
>>>
>>> I am biased as I am the author of the warnings plugin ;-)
>>>
>>> I like the dashboard of the warnings-ng better, but I ilke from the 
>>> publushcpp that you can see the line where the error is right from Jenkins 
>>> without need to open the editor and look for the line...
>>>
>>>
>>> This could be done in the warnings plugin as well.
>>> Example: 
>>> https://ci.jenkins.io/job/Plugins/job/analysis-model/job/master/1150/pmd/source.6e8cd82c-d953-4e48-9163-87d374ee6241/#32
>>>
>>>
>>> El viernes, 9 de abril de 2021 a las 14:40:34 UTC+2, ullrich...@
>>> gmail.com escribió:
>>>
 First of all: are you using the warnings-ng plugin or the cppcheck 
 plugin in your build? They use different models. 

 I’m not sure if there is an easy way to debug email ext templates in 
 the meantime, I am not using it actively. 
 But you can simply start with a subset of the script below and check 
 which values produce a result and which not. 

 Am 09.04.2021 um 14:32 schrieb jesus fernandez >>> >:

 my projects are in Perforce. What if I want to acces to one of those 
 properties which I know are available from looking at the jelly template, 
 for instance ${cppcheckResult.getDiff().getNumberNoCategorySeverity()} I 
 tried to echo that property but I get an error how could I access to it?
 this is the jelly template I am using (I took it from SO)
 >>> xmlns:d="jelly:define">
 
   
 >>> value="${it.getAction('org.jenkinsci.plugins.cppcheck.CppcheckBuildAction')}"
  
 />
 
 >>> value="${cppcheckAction.getResult()}" />
 
   Summary
 
 #cppcheckStatistics { width: auto; }
 #cppcheckStatistics .number { text-align: right; }
 
 
   
 
   Severity
   Count
   Delta
 
   
   
 
   Error
   ${cppcheckResult.statistics.getNumberErrorSeverity()}
   ${cppcheckResult.getDiff().getNumberErrorSeverity()}
 
 
   Warning
   ${cppcheckResult.statistics.getNumberWarningSeverity()}
   ${cppcheckResult.getDiff().getNumberWarningSeverity()}
 
 
   Style
   ${cppcheckResult.statistics.getNumberStyleSeverity()}
   ${cppcheckResult.getDiff().getNumberStyleSeverity()}
 
 
   Performance
   ${cppcheckResult.statistics.getNumberPerformanceSeverity()}
   ${cppcheckResult.getDiff().getNumberPerformanceSeverity()}
 
 
   Portability
   ${cppcheckResult.statistics.getNumberPortabilitySeverity()}
   ${cppcheckResult.getDiff().getNumberPortabilitySeverity()}
 
 
   Information
   ${cppcheckResult.statistics.getNumberInformationSeverity()}
   ${cppcheckResult.getDiff().getNumberInformationSeverity()}
 
 
   No category
   ${cppcheckResult.statistics.getN

Re: is there a way to see all the available methods of a plugin in Jenkins?

2021-04-09 Thread jesus fernandez
I have also tried this `def action = 
it.getAction('org.jenkinsci.plugins.cppcheck.CppcheckBuildAction')` which 
is how the variable get instantiated in the jelly template but I get ` 
java.lang.NullPointerException: Cannot invoke method getAction() on null 
object ` I am kind of lost here... any help is much appreciated

El viernes, 9 de abril de 2021 a las 16:05:31 UTC+2, jesus fernandez 
escribió:

> But the object model of both is different, you need to choose the 
> correct one in the email template!
>
> Yes, that template I am using it with publishcpp at the moment but I am 
> not able to get the value of any of their properties within my pipeline 
> like if I try to echo to check its value I get an error 
> 'groovy.lang.MissingPropertyException: No such property: cppcheckResult for 
> class: groovy.lang.Binding' so I am stuck trying to get the total number of 
> errors from each build
>
> El viernes, 9 de abril de 2021 a las 15:41:22 UTC+2, jesus fernandez 
> escribió:
>
>> but this is like god trying to explain something to a rock, I have just 
>> started in this world...hehehe
>>
>> El viernes, 9 de abril de 2021 a las 15:40:44 UTC+2, jesus fernandez 
>> escribió:
>>
>>> hahaha oh gosh I should have known I watched your video on youtube a few 
>>> days ago. 
>>>
>>> El viernes, 9 de abril de 2021 a las 15:39:30 UTC+2, 
>>> ullrich...@gmail.com escribió:
>>>


 I actually have tried both to publish the result, 


 But the object model of both is different, you need to choose the 
 correct one in the email template!

 have not decided which one to use yet, any suggestion? 


 I am biased as I am the author of the warnings plugin ;-)

 I like the dashboard of the warnings-ng better, but I ilke from the 
 publushcpp that you can see the line where the error is right from Jenkins 
 without need to open the editor and look for the line...


 This could be done in the warnings plugin as well.
 Example: 
 https://ci.jenkins.io/job/Plugins/job/analysis-model/job/master/1150/pmd/source.6e8cd82c-d953-4e48-9163-87d374ee6241/#32


 El viernes, 9 de abril de 2021 a las 14:40:34 UTC+2, ullrich...@
 gmail.com escribió:

> First of all: are you using the warnings-ng plugin or the cppcheck 
> plugin in your build? They use different models. 
>
> I’m not sure if there is an easy way to debug email ext templates in 
> the meantime, I am not using it actively. 
> But you can simply start with a subset of the script below and check 
> which values produce a result and which not. 
>
> Am 09.04.2021 um 14:32 schrieb jesus fernandez  >:
>
> my projects are in Perforce. What if I want to acces to one of those 
> properties which I know are available from looking at the jelly template, 
> for instance ${cppcheckResult.getDiff().getNumberNoCategorySeverity()} I 
> tried to echo that property but I get an error how could I access to it?
> this is the jelly template I am using (I took it from SO)
>  xmlns:d="jelly:define">
> 
>   
>  value="${it.getAction('org.jenkinsci.plugins.cppcheck.CppcheckBuildAction')}"
>  
> />
> 
>  value="${cppcheckAction.getResult()}" />
> 
>   Summary
> 
> #cppcheckStatistics { width: auto; }
> #cppcheckStatistics .number { text-align: right; }
> 
> 
>   
> 
>   Severity
>   Count
>   Delta
> 
>   
>   
> 
>   Error
>   ${cppcheckResult.statistics.getNumberErrorSeverity()}
>   ${cppcheckResult.getDiff().getNumberErrorSeverity()}
> 
> 
>   Warning
>   ${cppcheckResult.statistics.getNumberWarningSeverity()}
>   ${cppcheckResult.getDiff().getNumberWarningSeverity()}
> 
> 
>   Style
>   ${cppcheckResult.statistics.getNumberStyleSeverity()}
>   ${cppcheckResult.getDiff().getNumberStyleSeverity()}
> 
> 
>   Performance
>   ${cppcheckResult.statistics.getNumberPerformanceSeverity()}
>   ${cppcheckResult.getDiff().getNumberPerformanceSeverity()}
> 
> 
>   Portability
>   ${cppcheckResult.statistics.g

Jenkins Jobs Folder in Docker

2021-04-09 Thread Bruce Coveny
Hello,

I am building a custom docker image from jenkins/jenkins.  I would like to 
have the jobs, builds, and workspace folder be on an external volumne from 
from the container, but keep the rest of the configuration inside the 
container.

I have found where it is possible to set flags for builds and workspace, 
however, cannot find anything to externalize jobs folder.  Is this possible?

Thanks
Bruce

-- 
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/c575333f-d870-4141-b9f1-4002d9876e33n%40googlegroups.com.


Re: Jenkins Jobs Folder in Docker

2021-04-09 Thread 'Martin Schmude' via Jenkins Users
This is similar to the customized docker image that we build for Jenkins.
We just leave the $JENKINS_HOME/jobs folder intentionally inside the 
container. so that all job configurations are part of the docker image.
A Jenkins instance started from such an image has all its jobs available 
out-of-the-box.

There is in fact no option to tell Jenkins to use a different jobs folder 
other then $JENKINS_HOME/jobs.
As a workaround you could replace the $JENKINS_HOME/jobs folder by a link 
to e.g. /var/jenkins/jobs and let docker map a volume to /var/jenkins.

bco...@gmail.com schrieb am Freitag, 9. April 2021 um 17:44:56 UTC+2:

> Hello,
>
> I am building a custom docker image from jenkins/jenkins.  I would like to 
> have the jobs, builds, and workspace folder be on an external volumne from 
> from the container, but keep the rest of the configuration inside the 
> container.
>
> I have found where it is possible to set flags for builds and workspace, 
> however, cannot find anything to externalize jobs folder.  Is this possible?
>
> Thanks
> Bruce
>

-- 
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/c631227a-b5e1-4161-bfe8-52e1b2934f29n%40googlegroups.com.


Pipeline failing without errors

2021-04-09 Thread webde...@gmail.com
Bit of a doozy in this one. I have a pipeline within a folder structure. I 
made a copy of that folder so that all the jobs would come over and I would 
not have to touch the jobs except to target servers, change config files, 
and modify ps1 files. The pipeline that this pipeline is copied from runs 
very well. This pipeline, however, fails and does not give me an error 
message. I'm at a loss. Any ideas?


-- 
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/84d959dd-f58d-4d77-a194-8c1f7d363f3fn%40googlegroups.com.


Re: Pipeline failing without errors

2021-04-09 Thread webde...@gmail.com
I figured it out: for whatever reason, the Verify job did not have the 
ability to run itself independent of the pipeline (there was no "Build Now" 
button) so I had to Configure and then save for that to appear. Is this a 
bug with the new update?

On Friday, April 9, 2021 at 2:59:12 PM UTC-5 webde...@gmail.com wrote:

> Bit of a doozy in this one. I have a pipeline within a folder structure. I 
> made a copy of that folder so that all the jobs would come over and I would 
> not have to touch the jobs except to target servers, change config files, 
> and modify ps1 files. The pipeline that this pipeline is copied from runs 
> very well. This pipeline, however, fails and does not give me an error 
> message. I'm at a loss. Any ideas?
>
>
>

-- 
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/6eb5cea3-f2aa-467e-9a39-65c1abee9ea8n%40googlegroups.com.