debug output of jenkins workflow plugin - jenkins

I go my first steps with the jenkins workflow plugin and its really hard to see any problems with batch calls. If I ran an batch in a "normal" freestyle jenkins job I see all the output that produced from the batch. But with the workflow plugin all the output from the batch calls are hidden.
How can I enable the jenkins workflow plugin to show the output of a batch call?

Well this test shows that output is expected (of course). Certainly sounds like a bug. Is there a minimal reproducible test case? If so, file it.

Related

Jenkins Workflow Plugin Link to Downstream Jobs

I've just started working with the Workflow plugin.
The set-up I have currently consists of a Workflow script that uses the build step to basically define a pipeline made up of multiple downstream jobs.
This is working well but their there isn't really any link between the output of Workflow build and the output from all the downstream builds, is their a way to either,
Link from the Workflow project build output to all the corresponding downstream builds.
Capture the console output of the downstream jobs and include it in the output of the Workflow job.
I'm hoping with either of these options it will be possible to see the output from the whole pipeline via the Workflow job output.
IMO, the intention of Workflow is to replace pipelines of various Jenkins jobs with just a single job. This may be why Workflow doesn't make any significant effort to link to downstream jobs. I've been converting my "pipelines" to monolithic Workflow jobs, and really appreciating the fact that all the actions are more tightly grouped together.
Link from the Workflow project build output to all the corresponding downstream builds.
PR 218 under review as of this writing.
Capture the console output of the downstream jobs and include it in the output of the Workflow job.
JENKINS-26124

Is there a way to turn Jenkins job into a Jenkins DSL script automatically?

I use Job DSL Plugin to generate my Jenkins builds. But sometimes I make small changes to the build in Jenkins and I want to port those changes back to my DSL script automatically. Is there any way to achieve this?
Currently there is no way to generate a Job DSL script for an existing job. This has been reported in the Jenkins issue tracker as JENKINS-16360 some time ago and someone even offered a bounty, but AFAIK no one is working on the issue.

Parallelizing tests with Jenkins

I am using Jenkins for integration testing.
Just to give the context. At the moment I have a separate build server which produces the build daily and Jenkins is not used as the build server. The build server executes the unit testing in my case.
When build process is complete it invokes the Jenkins job. In that job Jenkins start to deploy the build into the Virtual machine. I have a script for doing this.
Followed to that my plan is to run several scripts for doing the end-to-end testing.
Now I have several question in this regard:
How to parallelize the execution of the end-to-end tests?
As I am adding scripts after script I am getting worried how manageable it will be?
I am always using the web interface for adding and changing the scripts. How to do this from the command line?
Any ideas for a good tutorial? Any pointers from all of you? Thanks!
Looks like Build Flow Plugin is what I need.
https://github.com/jenkinsci/build-flow-plugin
You might want to try and see if you can use the Build Pipeline plugin before build flow. Much better visualization of what is going on, less scripting.
I link Build and deploy jobs in one sequence and then have unit and integration test jobs linked separately off the build job. You can then use Fail The Build plugin to have downstream jobs fail upstream ones.

Jenkins claims build as Unstable though i see it passing

I've a simple Jenkins job where i runt python script to run a bunch of tests. I see the build as UNSTABLE even i see no obvious errors in the Jenkins job as well as no tests failing.
Whats i'm running is python
I'm not using any external test framework like nose. Its just a python script.
"Unstable" is the result Jenkins assigned when tests are failing. The only other way to get "Unstable" result is through the use of some post-build plugins. If you don't have any other plugins that are setting the build as unstable, then you have to take a closer look at all the tests.
If you paste the console output here, that would help as well

Jenkins Log to see what is causing a job to fail

I have a job in Jenkins that it testing nunit tests for a project. The Jenkins job fails, although all the unit tests pass.
So on Jenkins it says the build fails - but test results show no failures.
I cannot seem to figure out what is causing the job to fail. Is there some sort of way to see what causes a Jenkins job to be marked as fail? i.e. a detailed log file for a job or something? Any suggestions would be much appreciated.
Have you checked the Console Output for the failed job?
That said, errors in the Console Output can be hard to find, and then harder to understand. Sometimes I need to log in/remote to the build machine and build the solution, or run the unit tests, manually to see the error in an uncluttered, non-abstracted way (i.e., in the VisualStudio IDE or the NUnit GUI).
Oh, and the Log Parser Plugin makes finding errors in Jenkins much easier.

Resources