Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Jenkins "Console Output" is virtually empty

I have a fresh Jenkins install on Ubuntu

  1. New Job -> Build multi-configuration project
  2. Scroll down and click "Add build step" -> Execute shell and enter:

    echo hello
    
  3. Run the job (it succeeds)

  4. Look at the Console Output for the run:

    Started by user My Name
    Building in workspace /var/lib/jenkins/jobs/my_job/workspace
    Triggering default
    default completed with result SUCCESS
    Finished: SUCCESS
    

Follow the steps again, but with the Execute shell:

echo hello
thisshouldfail

and you get...

Started by user My Name
Building in workspace /var/lib/jenkins/jobs/my_job/workspace
Triggering default
default completed with result FAILURE
Finished: FAILURE

Notice how nowhere do you see "hello" in the output. This goes for anything I might put in that Execute Shell. Any help?

like image 597
ebeezer Avatar asked Dec 07 '12 02:12

ebeezer


People also ask

Where is Jenkins console output stored?

Log files should be at /var/log/jenkins/jenkins.

How do you save console output in Jenkins?

This is a reusable code block for Jenkins read console output during a build. In order to read the console output in Jenkins, All you need to do is copy and paste the code as a stage in your pipeline script. After the build is run, a file named buildConsolelog. txt will be stored in the home directory of your project.


1 Answers

When running a Multi-Configuration project, the log you see is of the Manager-job,
and it only shows you the summary of the complete run, which is, basically:
"I ran all your jobs, and all went OK" (Finished: SUCCESS)
or
"I ran all your jobs, and at least one of them failed" (Finished: FAILURE)

It cannot give you a single log of all the runs, because they ran multiple times
(on different slaves and/or different configurations).

To see the log of each run, click each red (or blue) "ball" in the matrix -
each represents a single instance of that Multi-Configuration build.

like image 103
Gonen Avatar answered Oct 21 '22 09:10

Gonen