Re: Setting the description of a failed test in pipeline groovy

2017-05-31 Thread Vincent Massol
> On 22 Feb 2017, at 14:43, Vincent Massol wrote: > > Hi Jerome, > >> On 21 Feb 2017, at 17:49, jer...@bodycad.com wrote: >> >> Add description on the side: >> >> manager.addShortText("${APPLY_TAG}") >> >> You can find a lot of property inside you syntax help page (change MY_HOST, >> MY_PIP

Re: Setting the description of a failed test in pipeline groovy

2017-02-22 Thread Vincent Massol
Hi Jerome, > On 21 Feb 2017, at 17:49, jer...@bodycad.com wrote: > > Add description on the side: > > manager.addShortText("${APPLY_TAG}") > > You can find a lot of property inside you syntax help page (change MY_HOST, > MY_PIPELINE_JOB): > > http://MY_HOST/Jenkins/job/MY_PIPELINE_JOB/pipelin

Re: Setting the description of a failed test in pipeline groovy

2017-02-21 Thread jerome
Add description on the side: manager.addShortText("${APPLY_TAG}") You can find a lot of property inside you syntax help page (change MY_HOST, MY_PIPELINE_JOB): http://MY_HOST/Jenkins/job/MY_PIPELINE_JOB/pipeline-syntax/globals this should with the properties of env/manager/currentBuild. the h

Re: Setting the description of a failed test in pipeline groovy

2017-02-21 Thread Vincent Massol
Hi Baptiste, > On 16 Feb 2017, at 08:45, Baptiste Mathus wrote: > > Hi Vincent, > I think the first step to convert that kind of thing is probably to > externalize it in a @NonCPS function to avoid potential issues while > refactoring. > Also, probably disable temporarily sandbox while convert

Re: Setting the description of a failed test in pipeline groovy

2017-02-15 Thread Baptiste Mathus
Hi Vincent, I think the first step to convert that kind of thing is probably to externalize it in a @NonCPS function to avoid potential issues while refactoring. Also, probably disable temporarily sandbox while converting it. There's access to the raw build from the wrapped one (currentBuild.rawBui

Re: Setting the description of a failed test in pipeline groovy

2017-02-06 Thread Vincent Massol
Thanks Richard, That looks a bit expensive though since all I need is to find the test results for the **current** job only. I wonder if there isn’t a simpler way. Thanks -Vincent > On 6 Feb 2017, at 14:39, Richard Ginga wrote: > > ok, if you need to step through to build object, I use this c

Re: Setting the description of a failed test in pipeline groovy

2017-02-06 Thread Richard Ginga
ok, if you need to step through to build object, I use this code to eventually get the log of some other other job: for (item in Jenkins.instance.getAllItems()) { // // find the correct job // if (item.getFullName() == SERVER_BUILD_NAME) { def job = item.getAllJobs() // // get the last successf

Re: Setting the description of a failed test in pipeline groovy

2017-02-06 Thread Vincent Massol
Hi Richard, > On 6 Feb 2017, at 14:31, Richard Ginga wrote: > > Vincent, I am not a Jenkins master, but, you need to replace the "manager" > variable. that is defined by groovy-postbuild. I "think" all you need is to > use "currentBuild" as the variable to access build methods and > "Jenkins.

Re: Setting the description of a failed test in pipeline groovy

2017-02-06 Thread Richard Ginga
Vincent, I am not a Jenkins master, but, you need to replace the "manager" variable. that is defined by groovy-postbuild. I "think" all you need is to use "currentBuild" as the variable to access build methods and "Jenkins.instance." to access FilePath. On Mon, Feb 6, 2017 at 3:25 AM, Vincent Mass

Setting the description of a failed test in pipeline groovy

2017-02-06 Thread Vincent Massol
Hi Jenkins masters, I had a groovy postbuild script that I'm trying to migrate to pipeline groovy. It's setting the description of failed test (in order to embed the screenshot taken by our selenium tests in the jenkins failed test UI - For example: http://ci.xwiki.org/job/xwiki-enterprise-t