Jenkins provides machine-consumable remote access API to its functionalities. Currently it comes in three flavors:
XML
JSON with JSONP support
Python
Remote access API is offered in a REST-like style. That is, there is no single entry point for all features, and instead they are available under the “…/api/” URL where “…” portion is the data that it acts on.
For example, if your Jenkins installation sits at http://ci.jruby.org/, visiting http://ci.jruby.org/api/ will show just the top-level API features available – primarily a listing of the configured jobs for this Jenkins instance.
Or if you want to access information about a particular build, e.g. http://ci.jruby.org/job/jruby-base/lastSuccessfulBuild/, then go to http://ci.jruby.org/job/jruby-base/lastSuccessfulBuild/api/ and you’ll see the list of functionalities for that build.
Remote API can be used to do things like these:
Retrieve information from Jenkins for programmatic consumption.
trigger a new build
create/copy jobs
Jobs with parameters, Also see Parameterized Build.
if [ -n "$job_status" ] then # Run your script commands here else echo "BUILD FAILURE: Other build is unsuccessful or status could not be obtained." exit 1 fi
How to restart Jenkins manually?
To restart Jenkins manually, you can use either of the following commands:
(jenkins_url)/safeRestart – Allows all running jobs to complete. New jobs will remain in the queue to run after the restart is complete.
(jenkins_url)/restart – Forces a restart without waiting for builds to complete.
I’m a DevOps/SRE/DevSecOps/Cloud Expert passionate about sharing knowledge and experiences. I have worked at Cotocus. I share tech blog at DevOps School, travel stories at Holiday Landmark, stock market tips at Stocks Mantra, health and fitness guidance at My Medic Plus, product reviews at TrueReviewNow , and SEO strategies at Wizbrand.
Here, I am going to tell you about Top 10 best DevOps Tools and Certification to Utilize In 2019 – 2020, which will be helpful for your Bright future. 1. Docker – A docker is a tool which is used to automate deployment applications in a light weight container so the application can work efficiently…
Multidimensional Array is Arrays of Array means one arrays have multiple array. You can define as it have 2Dimensional ([][]), 3Dimensional ([][][]), 4Dimensional ([][][]), and etc. ex:- How to work:- In this array first row or index or key any value necessary but second value not necessary to define. It can be created using nested…
In the Previous Post we Learned How to install Jenkins as Servlet on Tomcat server. In this post we will try even simple and easy way to run Jenkins on your machine using docker. Like all major servers Jenkins also comes as a light weight container and is being maintained by community aggressively. Pre-requisites :…
rajeshkumar created the topic: Ant Example code for Emma Instrumentation asdasd Regards, Rajesh Kumar Twitt me @ twitter.com/RajeshKumarIn Rajesh Kumar I’m a DevOps/SRE/DevSecOps/Cloud Expert passionate about sharing knowledge and experiences. I have worked at Cotocus. I share tech blog at DevOps School, travel stories at Holiday Landmark, stock market tips at Stocks Mantra, health and…
1) If you were asked to review a colleague’s code that they had written, what key things would you look for? For this question, your interviewer will obviously be looking to hear that you have adequate knowledge when it comes to coding processes. But most importantly, your interviewer will be looking to gauge your ability…
1) What is DevOps? DevOps is Development and Operation’s Collaboration, it’s a Union of 3Ps – Process, People and Product (working Product) that enable continuous integration and continuous delivery of value to our end users. DevOps accelerate the process to deliver applications and software services at high speed and high velocity. So that organization can…