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.
pasupuleti2 created the topic: Jenkins Workspace IssueMost of our jobs which are running on the Windows systems are failing due to issues in “deleting the workspace”. Our Jenkins working on Virtual machine. We have enough space to store Jenkins logs ERROR:: {code}[EnvInject] – Loading node environment variables.Building on master in workspace D:\Jenkins\workspace\IntelliLink Develop – Bitbucket>…
How to access Ansible remote machine using SSH user and key? There are following ways, you can autheticte linux remote server using Ansible. Method 1 – Password Less authentication https://www.tecmint.com/ssh-passwordless-login-using-ssh-keygen-in-5-easy-steps/ If You want to automate this process using Ansible in mutiple machine, follow this https://everythingshouldbevirtual.com/ansible-ssh-key-distribution-for-password-less-ssh/ Method 2 – SSH key file using command line [code]ansible-playbook…
What is Jenkins? Jenkins is one of the most popular DevOps tool for Continuous Integration and Continuous Deployment (CI/CD). It plays an important role in automating the software development process related to building, testing, and deploying, facilitating continuous integration, and continuous delivery. It was developed in the year 2004 by “Kohsuke Kawaguchi” and originally named…
What is AJAX ? Asynchronous Javascript & XML Set of web technologies Send & receive data asynchronously Does not interfere with current web page JSON has replaced XML for the most part Why XmlHttpRequest (XHR) Object is Used ? API in the form of an object Provided by the browser’s JS environment Methods transfer data…
Remote Desktop Protocol (RDP) tools are software applications or services that enable users to remotely access and control a computer or server from another device or location. These tools utilize the RDP protocol, which allows for a graphical user interface (GUI) interaction with the remote system. Here are some popular RDP tools: 1. Microsoft Remote…
Microservice is creating a lot of advantages for large teams, organizations with high-performance requirements, and systems that benefit from the kind of strongboundaries that microservice offers. However, these advantages aren’t free. The advantages of micro service’s come with a cost, and that cost is complexity.Micro Service is significantly more complex than the model it’s, and…