Wednesday, March 25, 2015

Change a Build Number in Jenkins

So you want to change a build number in Jenkins ... I searched the web all over the place and it's not out there.  So here it is.  Many people ask the question, but mostly ridiculous answers exist, mainly in the form of "You don't want to do that" or "Why would you want to do that?"  This is not helpful.

Although I admit that most of the reasons for needing to do this are probably misguided - even my own -- there may arise a legitimate need to do this.

Mine arises because the build (misguidedly) uses the Jenkins internal build number as part of the jar/Artifactory version string and I have moved the build to a new Jenkins server.  Doing this effectively resets the build number to one, which will result in overwriting an existing artifact on the repository.

To change the build number.  Change directories to the Jenkins job directory on the master.

cd  {path_to_jenkins_master_home}/jobs/{job_name}

Edit the file nextBuildNumber and change (advance -- I am not sure you can go backwards) the build number to the one you want to use.   Shelve the build and unshelve it to reload the job from the disk.  This allows reloading the job without restarting Jenkins.

When I ran the job it produced an error regarding the lastSuccessful and lastStable directories -- located in the same directory -- not being empty so I had to move those out of the way, at which point the next build correctly ran. 



     

Sunday, March 22, 2015

Pacific Red Snapper Hash

The other day I had a very remote craving.  It was a craving brought up from my past, probably brought up by my recent efforts to reconnect with my graduate school friends who now live in Europe.  I have been craving the snapper hash from Bijou Café in Portland.  It's unusual to have a craving from events 20 years ago, but here they are.  In the mid 90's I went more than a few times to Bijou in Portland Oregon for the snapper hash. 

I searched the web and it looks like I would have to go to Zarela's in New York, if I want me some snapper hash. 

Or make it myself.  The garam masala and cumin combine to give this an occasionally surprising background palette.

Serves 4

3 T. Oil
Cornstarch for dredging
2 eggs scrambled
Panko Japanese style bread crumbs
1 pound of Pacific red snapper fillets, cut into 1-2 inch chunks 1100 g
3 potatoes, peeled and cut into half inch cubes 900 g
1 medium onion, chopped fine 350 g
1 small shallot, chopped  60 g
3 scallions, chopped
5 garlic cloves, crushed  
1 jalapeno (optional) 36 g
1 green bell pepper, chopped 115 g
1/4 cup Parsley, chopped
Pinch of cumin, cinnamon, ground cloves and garam masala
Salt and pepper

Saute the vegetables and spices in the oil until the onions are soft. Add the potatoes. I added a little water and covered, so the potatoes might cook a bit from the steam.  Cook on a medium fire till brown, about 10-15 minutes.  Meanwhile dredge the snapper in cornstarch, Egg and panko and cook in another pan. 6 minutes on the first side an 4 minutes or so on the other.

Flip the potatoes and as the potatoes brown on the other side, gently add the finished snapper to the top of the potatoes.   When the potatoes are cooked, server with tabasco or Sriracha Mayo or lemon.