in Technology by
How to download the Console log for a particular Jenkins build programmatically?

1 Answer

0 votes
by

Using the Jenkins CLI - console - command

java -jar jenkins-cli.jar console JOB [BUILD] [-f] [-n N]

Produces the console output of a specific build to stdout, as if you are doing 'cat build.log'

  • JOB: Name of the job
  • BUILD: Build number or permalink to point to the build. Defaults to the last build
  • -f: If the build is in progress, append console output as it comes, like tail -f
  • -n N: Display the last N lines.

E.g.

ssh -l <ssh_username> -p <port_no> <Jenkins_URL> console <JOB_NAME>

Related questions

0 votes
    How to get the Jenkins version programmatically in Jobs/Pipelines or nodes other than master?...
asked Sep 14, 2021 in Technology by JackTerrance
0 votes
    How Jenkins jobs can be Triggered/Stopped/Controlled programmatically?...
asked Sep 14, 2021 in Technology by JackTerrance
0 votes
    I am building an Android application with Cordova which is running inside a webview. I know I can access ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Apr 14, 2022 in Education by JackTerrance
0 votes
    I am running another processing thread, and I would like to log results to a NSTextView, that when a ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Feb 18, 2022 in Education by JackTerrance
0 votes
    I tried searching on google, and got literally no results when trying to figure out what this means. My ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Aug 1, 2022 in Education by JackTerrance
0 votes
    I have a simple submit method, where Console.log(11) is printed first then console.log(1). I need ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked May 22, 2022 in Education by JackTerrance
0 votes
    I have a simple submit method, where Console.log(11) is printed first then console.log(1). I need ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked May 19, 2022 in Education by JackTerrance
0 votes
    What will be the output of log (-5.8) when executed on R console? (a) NAN (b) NA (c) Error ... Functions and Debugging of R Programming Select the correct answer from above options...
asked Feb 15, 2022 in Education by JackTerrance
0 votes
    How to share information between different build steps or stages in a Jenkins Job?...
asked Sep 14, 2021 in Technology by JackTerrance
0 votes
    I have a Maven build of a Java application that runs successfully on either Linux or Windows by typing the ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Jun 10, 2022 in Education by JackTerrance
0 votes
    My question may be silly but I've been trying several ways and I still can't do what I want, i. ... , JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Feb 16, 2022 in Education by JackTerrance
0 votes
    How to access a variable name programmatically?...
asked Jul 29, 2021 in Technology by JackTerrance
0 votes
    I have inherited a large legacy ColdFusion app. There are hundreds of some sql here #variable# statements ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 27, 2022 in Education by JackTerrance
0 votes
    I found the following piece of code from the adw launcher: Object service = launcher.getSystemService("statusbar ... for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Jan 13, 2022 in Education by JackTerrance
0 votes
    How to download Tableau Public?...
asked Nov 1, 2020 in Technology by JackTerrance
...