Open alexanderm2018 opened 5 years ago
Do you have a complete example how you wrote the code? Which version of jenkins-api have you used and which Jenkins version?
Jenkins ver. 2.177 Api is the latest from maven repo
public String getConsoleOutPutAsTextByBuildNumber( String jobName, String buildNumber){
String consoleText = null;
try{
consoleText = jenkinsServer.getJob(jobName).getBuildByNumber(Integer.valueOf(buildNumber)).details().getConsoleOutputText();
}
catch (Exception e) {
logger.info("Failed to fetch cosole output {}", e.getLocalizedMessage());
}
return consoleText;
}
Let me know if you need more information? Also is there is a help needed for the project?
I tried to get consoleOutPutText for build.details.cosoleOutPutText and got 404 this job was created with the option below. Regular job was working fine. this is the first time when I deal with pipeline job. I really use your client a lot so hopefully I will get it fixed.
Pipeline Orchestrates long-running activities that can span multiple build agents. Suitable for building pipelines (formerly known as workflows) and/or organizing complex activities that do not easily fit in free-style job type.