Re: CppCheck(XML parsing) with Warning-Next-Generation plugins

2020-04-03 Thread 'Christoph Fetzer' via Jenkins Users
For me that looks like an issue of your shell command and not of the 
plugin. Can you try to store the actual file to your workspace and make the 
plugin parse that?
For me the warnings.ng.plugin is just working in conjunction with cppcheck.

What I am doing looks like this:

The cppcheck-call:

cppcheck --xml --output-file="cppcheck-result.xml"  --library=D:\cppcheck.cfg 
--platform=win32A --template="{file},{line},{severity},{id},{message}" .


and the plugin-part:
  stage('Static Analysis') {
steps {
// call cppcheck as part of a Makefile target
recordIssues sourceCodeEncoding: 'ISO-8859-1', tools
: [cppCheck(pattern:'**/cppcheck-result.xml')]
}
}



Am Donnerstag, 2. April 2020 20:45:02 UTC+2 schrieb Ahmed Rafiq:
>
> Thanks for your reply.
> I've used the example xml from the given link, and getting error -
>
> Started by user unknown or anonymous
> Running as SYSTEM
> Building in workspace 
> /media/persistent_storage/home/jenkins-warnings/work/workspace/test
> [test] $ /bin/sh -xe /tmp/jenkins918250917560153069.sh
> + echo '
> 
>   
>   
> /tmp/jenkins918250917560153069.sh: line 7: syntax error near unexpected token 
> `newline'
>   
> 
>   
>   
>   https://github.com/jenkinsci/warnings-ng-plugin/blob/master/plugin/src/test/resources/io/jenkins/plugins/analysis/warnings/cppcheck.xml)
>>  
>> generates error and didn't produces any formatted string.
>>
>> Any help in this regards is highly appreciated. 
>>
>>
>> When you don’t show error messages or log messages we cannot help. Just 
>> writing that it does not work is not enough information.
>>
>> 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 jenkins...@googlegroups.com .
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/jenkinsci-users/4ef79c27-73bf-4062-a240-65f9b38f9341%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 jenkins...@googlegroups.com .
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/jenkinsci-users/0A40A6D1-60D0-477B-B000-430235D6808E%40gmail.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/a976054d-bd91-4643-96fe-927270bf5019%40googlegroups.com.


Re: CppCheck(XML parsing) with Warning-Next-Generation plugins

2020-04-03 Thread Ullrich Hafner


> Am 03.04.2020 um 09:07 schrieb 'Christoph Fetzer' via Jenkins Users 
> :
> 
> For me that looks like an issue of your shell command and not of the plugin. 

Exactly!

> [CPPCheck] Skipping execution of recorder since overall result is 'FAILURE'
> Finished: FAILURE
> 

The log indicates that my plugin does not even run since the build already 
failed. (You can change that behavior but I think it makes more sense to 
correct your build.) 

If you want to test the plugin I can recommend the plugin 
https://github.com/jenkinsci/file-operations-plugin 

I’m using that in my testing courses to create manual integration tests that 
use fake input files for my warning plugin.
With this plugin you can create an example file for cppcheck in the workspace.

> 
> On Thu, Apr 2, 2020 at 8:19 PM Ullrich Hafner gmail.com 
> > wrote:
> 
> 
>> Am 02.04.2020 um 13:06 schrieb Hakan Rafik gmail.com 
>> >:
>> 
>> I'm using the next generation plugins to represent the CppCheck warnings and 
>> errors. 
>> But the plugins is not parsing Carriage return: 
 or Line feed: 
. 
>> I've tried to feed the plugins with the given example 
>> (https://github.com/jenkinsci/warnings-ng-plugin/blob/master/plugin/src/test/resources/io/jenkins/plugins/analysis/warnings/cppcheck.xml
>>  
>> )
>>  generates error and didn't produces any formatted string.
>> 
>> Any help in this regards is highly appreciated. 
>> 
> 
> When you don’t show error messages or log messages we cannot help. Just 
> writing that it does not work is not enough information.
> 
>> 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 jenkins...@ <>googlegroups.com .
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/jenkinsci-users/4ef79c27-73bf-4062-a240-65f9b38f9341%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 jenkins...@ <>googlegroups.com .
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/jenkinsci-users/0A40A6D1-60D0-477B-B000-430235D6808E%40gmail.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/a976054d-bd91-4643-96fe-927270bf5019%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/E593C47E-EAF9-40A2-9E7D-11B2D4BA7F9A%40gmail.com.


RE: Command line acccess to build actions in muti branch pipeline

2020-04-03 Thread BCT Roel de Wildt
Hi,

My thanks for the solution you gave me.

I have implemented this solution with the cron entry and the resource lock. Now 
the pipelines are triggered at 19:00 and executed sequential, but my concerns 
are when we create a branch of them that they are also executed daily. That is 
not what I want to happen. It should be a manual action to build those branches.

Because the Jenkinsfile is stored in our svn project and the trigger is also in 
the Jenkinsfile. I think when I make a branch for a new release version of the 
product it would also executed at 19:00. How can I prevent this from triggering 
without adjusting the Jenkinsfile for every branch?

Kind regards,

Roel de Wildt
Software Engineer

Van: jenkinsci-users@googlegroups.com [mailto:jenkinsci-users@googlegroups.com] 
Namens Gianluca
Verzonden: woensdag 1 april 2020 11:25
Aan: Jenkins Users 
Onderwerp: Re: Command line acccess to build actions in muti branch pipeline

Hi,
I'm not sure I'm following you ... or maybe we are using different ways to 
write our pipeline.
So, to be more explicit ... this is what we have in our pipeline:


pipeline {


triggers {


// runs every two hours


cron('H H/2 * * *')


}


That is a Multibranch project (to be precise we use GitHub, not sure if what I 
see maybe related to Git plugin itself) and what happens due to the "H" special 
case is that each branch will have a different starting hour and minutes that 
actually spread them over the time.
In that case you achieve the fact that there will never be two jobs starting at 
the same time.
Now, you can still have them overlap after they started.
To avoid that they run a certain stage at the same time we use locks:

   steps {


// lock not usable in declarative pipeline due to JENKINS-43002


script { lock(label: resourceLabel, quantity: 1) {


With the above, what you achieve is that only and only one job at the time can 
run what's inside the script block.

We both cron and locks ... you spread your jobs across day hours and you are 
guaranteed that they run sequentially when the reach a part that can't be run 
by two jobs at the same time. And that works across branches.

On Wednesday, 1 April 2020 10:09:19 UTC+1, BCT Roel de Wildt wrote:
Hi,

I have looked at it but it seems only possible if I change our Jenkinsfile 
within each project stored in svn within the branches of it. And I can’t see 
where to put the cron entry in the multi branch pipeline. I have only the 
following options (… 12 hours, 1 day, 2 days, etc… ) in “Periodically if not 
otherwise run” in the triggers section.

That means I can’t control the time it will be executed.

Alternative:
I can execute a scheduled curl program which triggers the “trunk” successfully, 
but the “branches/2019/trunk” gives a http 404 error.

Kind regards,

Roel de Wildt
Software Engineer

Van: jenkins...@googlegroups.com 
[mailto:jenkins...@googlegroups.com] Namens Gianluca
Verzonden: woensdag 1 april 2020 09:17
Aan: Jenkins Users >
Onderwerp: Re: Command line acccess to build actions in muti branch pipeline

Hi,
we have a similar issue and we use a combination of trigger cron command with 
"H" (if instead of * into cron syntax, you put "H" then Jenkins treats it 
special)
>From documentation https://jenkins.io/doc/book/pipeline/syntax/
"The H symbol can be thought of as a random value over a range, but it actually 
is a hash of the job name, not a random function, so that the value remains 
stable for any given project."

But also that's is not sufficient in cases the pipeline takes more than an hour 
(as in our case), hence we add on top of this the usage of LockableResources 
and we created a resource that we lock in the stages of the pipeline we know we 
can't run at the same time because of constraints.

https://jenkins.io/doc/pipeline/steps/lockable-resources/

So, a combination of both ... does the tricks for us and I think it should work 
as well for you too.

Cheers,
Gianluca


On Wednesday, 1 April 2020 08:08:41 UTC+1, BCT Roel de Wildt wrote:
Hello,

In previous versions of Jenkins LTS there was a jenkins-cli.jar which I used to 
trigger a build job. Now with the latest (2.222.1) I can’t find how to do the 
build jobs on a scheduled base. Where one is shedules at 19:00, the other on 
20:30, etc… They can’t run at same time due resources limits. What is the best 
option to execute a single build job in a multi branch pipeline?

Kind regards,

Roel de Wildt
Software Engineer

--
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 jenkins...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/c96a2c92-9eb4-4e3e-9323-63c829418bc3%40googlegroups.com

Re: CppCheck(XML parsing) with Warning-Next-Generation plugins

2020-04-03 Thread Ahmed Rafiq
Thanks for the reply.
What I've done is, put this,

echo '

  
  
  

  
  
'

inside *execute shell command*, under *Build*. Set Tools *CPPCheck* and
*Build*.
I was waiting that the *
* would produce *new** line* where used. But
they didn't.

On Fri, Apr 3, 2020 at 10:14 AM Ullrich Hafner 
wrote:

>
>
> Am 03.04.2020 um 09:07 schrieb 'Christoph Fetzer' via Jenkins Users <
> jenkinsci-users@googlegroups.com>:
>
> For me that looks like an issue of your shell command and not of the
> plugin.
>
>
> Exactly!
>
> [CPPCheck] Skipping execution of recorder since overall result is 'FAILURE'
>> Finished: FAILURE
>>
>>
>>
> The log indicates that my plugin does not even run since the build already
> failed. (You can change that behavior but I think it makes more sense to
> correct your build.)
>
> If you want to test the plugin I can recommend the plugin
> https://github.com/jenkinsci/file-operations-plugin
> I’m using that in my testing courses to create manual integration tests
> that use fake input files for my warning plugin.
> With this plugin you can create an example file for cppcheck in the
> workspace.
>
>
>> On Thu, Apr 2, 2020 at 8:19 PM Ullrich Hafner 
>> wrote:
>>
>>>
>>>
>>> Am 02.04.2020 um 13:06 schrieb Hakan Rafik :
>>>
>>> I'm using the next generation plugins to represent the CppCheck warnings
>>> and errors.
>>> But the plugins is not parsing* Carriage return*: 
 or *Line feed*:
>>> 
.
>>> I've tried to feed the plugins with the given example (
>>> https://github.com/jenkinsci/warnings-ng-plugin/blob/master/plugin/src/test/resources/io/jenkins/plugins/analysis/warnings/cppcheck.xml)
>>> generates error and didn't produces any formatted string.
>>>
>>> Any help in this regards is highly appreciated.
>>>
>>>
>>> When you don’t show error messages or log messages we cannot help. Just
>>> writing that it does not work is not enough information.
>>>
>>> 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 jenkins...@googlegroups.com.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/jenkinsci-users/4ef79c27-73bf-4062-a240-65f9b38f9341%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 jenkins...@googlegroups.com.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/jenkinsci-users/0A40A6D1-60D0-477B-B000-430235D6808E%40gmail.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/a976054d-bd91-4643-96fe-927270bf5019%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/E593C47E-EAF9-40A2-9E7D-11B2D4BA7F9A%40gmail.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/CAOxCx6nrcUsn3_X6ACqH-FMHyLpa7poe%2B0TKYi%2B3Pckmn3k32g%40mail.gmail.com.


Capturing output of an aborting build?

2020-04-03 Thread Stephan Bergmann
LibreOffice's Jenkins instance at  uses 
 to abort hanging builds.


At least on Linux, the actual build is wrapped in a kill-wrapper process 
to make sure that Jenkins' attempt at terminating a to-be-aborted build 
reliably kills all processes spawned during that build.  (See 
 
"Make sure tb_slave_wrapper kills all spawned processes".  The 
kill-wrapper spawns the actual build in a new process group, and when it 
receives SIGTERM from Jenkins it sends SIGKILL to that whole process group.)


Now, I thought it would be a good idea if the kill-wrapper could print 
some information about any remaining process before it kills them.  That 
way, we could get a clue as to why a build hung and had to be aborted by 
Jenkins.  (See 
 
"kill-wrapper: pstree of hung processes".)


However, this does not work as intended, and the pstree output is not 
captured in the build's console output (see e.g. 
 
which merely ends with



Build timed out (after 15 minutes). Marking the build as aborted.
Build was aborted
Finished: ABORTED


for a forcefully hung build).  I assume that the timing inside Jenkins 
is such that aborting a build causes the capturing of the build's 
stdout/-err output to stop before the spawned process has terminated. 
But I did not get very far trying to understand what happens by reading 
the Jenkins source code.


Is there a known solution to this problem (by changing the configuration 
of the job, say, or by modifying the Jenkins source code)?


--
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/a69af91c-8382-82dc-d150-e8a51827154d%40redhat.com.


RE: CppCheck(XML parsing) with Warning-Next-Generation plugins

2020-04-03 Thread Jérôme Godbout
Hi,
maybe not what you are looking for, but I do run my cppcheck with the following 
command (bat or sh):

def RunCppCheck(scriptConfig, outputXml, otherOptions = "") {
String cmd = “cppcheck --project=${scriptConfig} --xml --xml-version=2 
${otherOptions} 2> ${outputXml}”;
if(isUnix()) {
  sh(cmd);
} else {
 bat(cmd);
 }
}

Then I parse the output xml file like any unit tests results or you can use 
warning parsings regex. By the way the command line doesn’t support the gui 
project file (the command line into cppcheck are trash big time. They clearly 
added command line aside of the gui and this lead to ugly command line.


From: 'Christoph Fetzer' via Jenkins Users 
Sent: April 3, 2020 3:08 AM
To: Jenkins Users 
Subject: Re: CppCheck(XML parsing) with Warning-Next-Generation plugins

For me that looks like an issue of your shell command and not of the plugin. 
Can you try to store the actual file to your workspace and make the plugin 
parse that?
For me the warnings.ng.plugin is just working in conjunction with cppcheck.

What I am doing looks like this:

The cppcheck-call:


cppcheck --xml --output-file="cppcheck-result.xml"  --library=D:\cppcheck.cfg 
--platform=win32A --template="{file},{line},{severity},{id},{message}" .

and the plugin-part:
  stage('Static Analysis') {
steps {
// call cppcheck as part of a Makefile target
recordIssues sourceCodeEncoding: 'ISO-8859-1', tools: 
[cppCheck(pattern:'**/cppcheck-result.xml')]
}
}


Am Donnerstag, 2. April 2020 20:45:02 UTC+2 schrieb Ahmed Rafiq:
Thanks for your reply.
I've used the example xml from the given link, and getting error -


Started by user unknown or anonymous

Running as SYSTEM

Building in workspace 
/media/persistent_storage/home/jenkins-warnings/work/workspace/test

[test] $ /bin/sh -xe /tmp/jenkins918250917560153069.sh

+ echo '



  

  

/tmp/jenkins918250917560153069.sh: line 7: syntax error near unexpected token 
`newline'

  



  

  

  https://github.com/jenkinsci/warnings-ng-plugin/blob/master/plugin/src/test/resources/io/jenkins/plugins/analysis/warnings/cppcheck.xml)
 generates error and didn't produces any formatted string.

Any help in this regards is highly appreciated.


When you don’t show error messages or log messages we cannot help. Just writing 
that it does not work is not enough information.


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 jenkins...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/4ef79c27-73bf-4062-a240-65f9b38f9341%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 jenkins...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/0A40A6D1-60D0-477B-B000-430235D6808E%40gmail.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/a976054d-bd91-4643-96fe-927270bf5019%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/YQXPR01MB322257559A4D151CC7BD472ECDC70%40YQXPR01MB3222.CANPRD01.PROD.OUTLOOK.COM.


Post build actions (e.g. comments) using bitbucket branch source plugin

2020-04-03 Thread Jamie Johnson
I am trying to setup a multi branch pipeline and want to be able to support 
custom comments such as was possible in the to bitbucket.  This was 
possible using the stash pull request builder.  What is the best way to 
accomplish 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/68a451f3-17a4-4716-a18c-a88f18872638%40googlegroups.com.


Re: Post build actions (e.g. comments) using bitbucket branch source plugin

2020-04-03 Thread Yeikel
I don't know if it is best way but there is a rest API in bitbucket[1] to
support this activity and more.

[1]
https://community.atlassian.com/t5/Bitbucket-questions/Add-comments-to-Pull-Requests-from-API/qaq-p/81069

On Fri, Apr 3, 2020, 10:42 AM Jamie Johnson  wrote:

> I am trying to setup a multi branch pipeline and want to be able to
> support custom comments such as was possible in the to bitbucket.  This was
> possible using the stash pull request builder.  What is the best way to
> accomplish 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/68a451f3-17a4-4716-a18c-a88f18872638%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/CAMMhyA1gTYya65RgFuFb-PwvdkYFAF0JUJRDQbwCw3v%3D0Oz94w%40mail.gmail.com.


Re: Post build actions (e.g. comments) using bitbucket branch source plugin

2020-04-03 Thread Jamie Johnson
Thanks for the suggestion, how would I invoke this as I don't see a way to 
do a post build action currently?

On Friday, April 3, 2020 at 11:00:17 AM UTC-4, Yeikel wrote:
>
> I don't know if it is best way but there is a rest API in bitbucket[1] to 
> support this activity and more. 
>
> [1] 
> https://community.atlassian.com/t5/Bitbucket-questions/Add-comments-to-Pull-Requests-from-API/qaq-p/81069
>
> On Fri, Apr 3, 2020, 10:42 AM Jamie Johnson  > wrote:
>
>> I am trying to setup a multi branch pipeline and want to be able to 
>> support custom comments such as was possible in the to bitbucket.  This was 
>> possible using the stash pull request builder.  What is the best way to 
>> accomplish 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 jenkins...@googlegroups.com .
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/jenkinsci-users/68a451f3-17a4-4716-a18c-a88f18872638%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/e0e221c4-c584-4194-9434-42ba5ca7ed3d%40googlegroups.com.


Re: Post build actions (e.g. comments) using bitbucket branch source plugin

2020-04-03 Thread Yeikel
If you are using a multi branch pipeline, you can add one last step at the
end to do that activity.

stage('Add pull request comment') {
steps {
   /// API call
}
}


On Fri, Apr 3, 2020 at 11:35 AM Jamie Johnson  wrote:

> Thanks for the suggestion, how would I invoke this as I don't see a way to
> do a post build action currently?
>
> On Friday, April 3, 2020 at 11:00:17 AM UTC-4, Yeikel wrote:
>>
>> I don't know if it is best way but there is a rest API in bitbucket[1] to
>> support this activity and more.
>>
>> [1]
>> https://community.atlassian.com/t5/Bitbucket-questions/Add-comments-to-Pull-Requests-from-API/qaq-p/81069
>>
>> On Fri, Apr 3, 2020, 10:42 AM Jamie Johnson  wrote:
>>
>>> I am trying to setup a multi branch pipeline and want to be able to
>>> support custom comments such as was possible in the to bitbucket.  This was
>>> possible using the stash pull request builder.  What is the best way to
>>> accomplish 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 jenkins...@googlegroups.com.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/jenkinsci-users/68a451f3-17a4-4716-a18c-a88f18872638%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/e0e221c4-c584-4194-9434-42ba5ca7ed3d%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/CAMMhyA1J1JzMpxdesCjtDbkNq6mGWKNAK_sEyZqCZ9iBXbL2-A%40mail.gmail.com.


Re: Does Slack Notification plugin know to autodetect build status?

2020-04-03 Thread lesterp
There was an excellent post on the Jenkins blog that had some great 
examples, here:

https://jenkins.io/blog/2017/02/15/declarative-notifications/

On Thursday, April 2, 2020 at 4:40:18 AM UTC-7, Vitaly Karasik wrote:
>
> Question regarding Slack Notification plugin in declarative pipeline: is 
> there an elegant way to modify color and embed relevant emoji depends on 
> currentBuild.currentResult?
> Or I should clone "slackSend" 3 times - for success, unstable and failed 
> build?
>

-- 
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/2626030f-3813-49f8-ab2d-a6d7f40afb2c%40googlegroups.com.