Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Java API for Jenkins

I am writing a Java application where I need to track the status of Jenkins build and execute few actions on build success and failure.

I am quite new to Jenkins. Is there a Java api available to track the status of the build?

Is it possible to trigger the java application on successful completion or during the failure of the build.

Your suggestions are welcome.

Thanks, Santhosh

like image 479
Santhosh Avatar asked Oct 19 '22 23:10

Santhosh


1 Answers

There is the Jenkins REST API which could suit your needs

Alternatively, there are literally hundreds of plugins for Jenkins so it is likely that you could run your whole process from within Jenkins using

Build Pipeline

This plugin provides a Build Pipeline View of upstream and downstream connected jobs that typically form a build pipeline. In addition, it offers the ability to define manual triggers for jobs that require intervention prior to execution, e.g. an approval process outside of Jenkins.

Multijob

Gives the option to define complex and hierarchical jobs structure in Jenkins.

like image 70
KeepCalmAndCarryOn Avatar answered Oct 22 '22 13:10

KeepCalmAndCarryOn