How to get the details of the job along with it console output using Jenkins REST API
example of builds
console output:
I am using following commands to get the path of console log
echo $JENKINS_HOME/jobs/$JOB_NAME/builds/${BUILD_NUMBER}/log
echo $BUILD_URL/consoleText
It would provide the path to console log
http://localhost:8080/job/Echo/25//consoleText
but if i try to get the data from it using c#.net it would through me a exception
I am using following code to get the data
public string Download_Contents(string URI)
{
string Data = string.Empty;
try
{
using (var wc = new System.Net.WebClient())
Data = wc.DownloadString(URI);
}
catch (Exception ex)
{
throw ex;
}
return Data;
}
Exception: