Category Archives: Blog

blog post 5 (maven Release Plugin)

Maven Release Plugin Problems

In particular, some of the pitfalls of the maven-release-plugin in the context of git-flow are:
• MRP writes .backup and release.properties files to your working tree which are easily committed when they shouldn’t be
• MRP does a build in the prepare goal and a build in the perform goal causing tests to run 2 times
• MRP and git-flow both create tags leaving you with two tags if you forget to delete one of them
• If something goes wrong, MRP usually leaves you in a bad state and rollback doesn’t work most of the time

Blog post 4

Open Source Projects using Jenkins

 Jenkins is a great open source continuous integration server and there are many other open source projects using the Jenkins. I was interested in getting list of all of them and after some exploring through the internet here are the tools that I found.

Open source projects using Jenkins, though Jenkins service not accessible for the public (yet):

And Cloudbees hosts some OSS projects providing Jenkins as a service.

 

Blog post 2

Built-in Groovy scripting

Jenkins has a built-in scripting language, Groovy. It can be of great help if you need to do something that is not provided by any setting or plugin and you do not feel you want to write a new plugin.

The Groovy script has access to all the internals of Jenkins, so there is a lot you can do with it, both good and bad…

The internals of Jenkins are documented at http://javadoc.jenkins-ci.org/.

You can find a Groovy script console in your Jenkins by clicking on “Manage Jenkins” and “Script console”. You type in small Groovy scripts, hit cmd+Return and Jenkins will evaluate the script. (I’m sure there is a keyboard shortcut for PC users too.)

Jenkins also has a Groovy plugin which adds a build step which can run a Groovy script. And there is also a Groovy post-build plugin, which allows you run a Groovy script after the build is done.

Blog post 1 (Restore job config)

Restore job config

To do that I had to have the Job Configuration History plugin installed, so that it preserve the old config.xml’s and it could show what has changed.

But it does have a link for downloading the old config.xml file. I downloaded it.

Jenkins has a command-line interface, CLI. ssh may want to authenticate you and you must add your ssh public key to your Jenkins user information.

to restore the old job configuration was a simple one-liner:

ssh -p jenkinshost update-job jobname < config.xml

The port where Jenkins listens for ssh protocol (PORT) is random by default. You can either set it to a fixed port in the Jenkins configuration or you can look up the port number from Jenkins HTTP headers.