Re: JUnit Results not parsing in Jenkinsfile-based Pipeline Build

2019-08-18 Thread Ullrich Hafner
Shoudn’t the command use ’testResults’ as parameter name?

junit testResults: '**/build/pytest.xml'


> Am 18.08.2019 um 06:42 schrieb Matt Hollingsworth :
> 
> Hi everyone,
> 
> I ran into a weird issue that I thought you might be able to help 
> troubleshoot. I'm using Jenkinsfile-based Pipelines with python, and I use 
> pytest to produce JUnit-compatible reports after the tests are run. The 
> problem is that I get an error when I try to parse the results with the junit 
> step: "No test report files were found. Configuration error?" Here are the 
> relevant parts of the Jenkinsfile:
> 
> stage("Unit tests") {
>   steps {
> sh "runtests.sh" // This produces build/pytest.xml
> sh "cat build/pytest.xml"
> junit 'build/pytest.xml'
>   }
> }
> 
> The sh’s cat command runs properly and prints out a properly formatted junit 
> xml file--I can parse it with junit-viewer, for example. But I still get the 
> error. Any idea what's going on, or how I could debug this properly?
> 
> Thanks for the help!
> 
> Best,
> Matt
> 
> -- 
> 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/8e1eae66-4c8b-4de0-9d9e-e0474a7ab93c%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/D0E7E558-57F6-4B92-8724-3D7156A5EA96%40gmail.com.


Generate stage from script stdout

2019-08-18 Thread Yeikel Santana
Dear Jenkins Community, 

I am aware that we can generate dynamic stages using groovy scripts. 
Question is, can we also do this from the standard output of a script? 

For example, I have a script written in Nodejs that I execute with "sh node 
script.js" and that It can produce standard output to the console.I would 
like to use its outputs to generate new stages . Is this possible? Do I 
need to parse the output from groovy in order to do something like this? 

I would like to avoid rewriting this script to groovy as much as possible. 

Thank you!

-- 
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/33aff583-6d23-4a6f-8921-a3bc43f2fd21%40googlegroups.com.


Generate Stages from a script stdout

2019-08-18 Thread Yeikel Santana
Dear Jenkins Community. 

I have a script written in NodeJS that I execute from Jenkins using the 
shell. I would like to know if it possible to derive stages from its 
standard output without parsing the output and generating the stages from 
groovy. 

I am aware that we can generate dynamic stages[1] using groovy, but I would 
like to avoid rewriting this script or parsing the body in groovy to be 
able to do this. 

[1] 
https://stackoverflow.com/questions/42837066/can-i-create-dynamically-stages-in-a-jenkins-pipeline

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/7ad1f455-6c4a-413e-afbd-eee6a01a1382%40googlegroups.com.


Re: Programmatically searching the artifacts from multiple jobs

2019-08-18 Thread Tony Cappellini
Perhaps. I'll have to give it a try to see what its limitations are.

When you have 5-10 artifacts per job, it takes a lot of time saving
them, so they can be attached to a Jira ticket.
Jenkins doesn't provide a way to save those files. You need to view
each one, copy it's contents into an editor, then save those files,
manually.

thanks

On Sun, Aug 18, 2019 at 10:49 AM Martin d'Anjou
 wrote:
>
> Could the run selector plugin help?
> https://github.com/jenkinsci/run-selector-plugin
>
> Martin
>
> --
> 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/nNwRWXHOs5E/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/211067ec-a99a-4251-990f-a4e66e8b9d58%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/CABRXM4ncTCyAEnzE7KZjcqvFbv0e2AGRe_8aij2RRddxQtXqiA%40mail.gmail.com.


Re: Programmatically searching the artifacts from multiple jobs

2019-08-18 Thread Martin d'Anjou
Could the run selector plugin help?
https://github.com/jenkinsci/run-selector-plugin

Martin

-- 
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/211067ec-a99a-4251-990f-a4e66e8b9d58%40googlegroups.com.


Accessing user build variables of another build

2019-08-18 Thread Martin d'Anjou
Have a look at 
https://github.com/jenkinsci/run-selector-plugin/blob/master/README.md

Martin

-- 
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/7601585c-93eb-447d-92bb-709c95add3fc%40googlegroups.com.


JUnit Results not parsing in Jenkinsfile-based Pipeline Build

2019-08-18 Thread Matt Hollingsworth
Hi everyone,

I ran into a weird issue that I thought you might be able to help 
troubleshoot. I'm using Jenkinsfile-based Pipelines with python, and I use 
pytest to produce JUnit-compatible reports after the tests are run. The 
problem is that I get an error when I try to parse the results with the 
junit step: "No test report files were found. Configuration error?" Here 
are the relevant parts of the Jenkinsfile:

stage("Unit tests") {
  steps {
sh "runtests.sh" // This produces build/pytest.xml
sh "cat build/pytest.xml"
junit 'build/pytest.xml'
  }
}

The sh’s cat command runs properly and prints out a properly formatted 
junit xml file--I can parse it with junit-viewer, for example. But I still 
get the error. Any idea what's going on, or how I could debug this properly?

Thanks for the help!

Best,
Matt

-- 
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/8e1eae66-4c8b-4de0-9d9e-e0474a7ab93c%40googlegroups.com.