Jenkins Pry Plugin


I released Jenkins Pry plugin 1.1 today. This plugin adds the “pry” command to Jenkins CLI so that you can use pry to introspect a running Jenkins instance via pry.

Because this builds on top of Jenkins CLI, you can remotely connect from your laptop to your Jenkins master, safe with SSH public key authentication and transport encryption.

And because this builds on top of pry, it lets you interactively explore a rich object graph of Jenkins, doing bulk operations, checking the state of the system, etc.

I’ve done enough integration work so that the readline support in pry works as expected. So you can enjoy the code completion and command history support in pry, even though it’s running remotely. Nifty, isn’t it?

I hope this is useful for Jenkins admins who are more familiar with Ruby than Groovy (for which we had this “groovysh” CLI command for the longest time), but my real goal is to use this kind of remote Ruby code execution mechanism to let people run tests quickly when they develop Jenkins plugins in Ruby. This morning I’ve used this to verify that I can embed Cucumber tests. So stay tuned for more on that front!

2 Comments Add yours

  1. Julien says:

    Hi, you should look at integrating CRaSH that is native JVM shell and provides support for different remote protocols :

  2. kohsuke says:

    Or like wise, if you are interested in writing a Jenkins plugin to integrate CRaSH into Jenkins, that’d be awesome, too!

Leave a Reply

Your email address will not be published. Required fields are marked *