Need Jenkins build info in a html file

17 views
Skip to first unread message

Imtiaz Shaik

unread,
Aug 14, 2017, 3:35:06 PM8/14/17
to Jenkins Users
HI,

I need to input the Jenkins build id ,  job name, build url, build date, in a html file. Could you please if any sample html file?

Thanks,
Imtiaz

Victor Martinez

unread,
Aug 15, 2017, 3:49:38 AM8/15/17
to Jenkins Users
All those details are assigned to specific environment variables:

You can generate that particular html page on the fly while running that particular job, or you can query the restapi to get those details:

- %YOUR_JENKINS_URL%/job/%YOUR_JOB_NAME%/api/json?tree=name,builds[number,url,timestamp]&pretty=true
- %YOUR_JENKINS_URL%/job/%YOUR_JOB_NAME%/api/xml?tree=name,builds[number,url,timestamp]

My two cents


Reply all
Reply to author
Forward
0 new messages