Blog: May 2018

Most of these posts were originally posted somewhere else and link to the originals. While this blog is not set up for comments, the original locations generally are, and I welcome comments there. Sorry for the inconvenience.

How do I configure Jenkins to strip the leading "origin/" in a git branch parameter?

I asked the following question on Stack Overflow:

I'm using Jenkins with a branch parameter to specify the branch to build from. Other stuff downstream needs the branch name to not have the leading "origin/" -- just "feature/blahblah" or "bugfix/12345" or similar. The advanced settings for the parameter let me specify a branch filter via regex, but I'm a regex newbie and the solutions I've found in searching are language-dependent. The Jenkins documentation for this is sparse.

When a user clicks on "build with parameters", for the branch I want to see branch names that omit the leading "origin/". I'm not sure how to write a regex for Jenkins that will "consume" that part of the branch name before setting the parameter value.

I solved this problem once before, I'm pretty sure using Stack Overflow, but I can't find those hints now.

I got an answer that uses a Groovy script, which depends on adding a plugin. I decided to wait a few days before exploring adding plugins to our server.

In the meantime I figured it out and added this answer:

For the git branch parameter, set Branch Filter to:

origin/(.*)

I found the parentheses to be counter-intuitive, because if you don't specify a filter you get:

.*

(No parens.) If you are filtering stuff out, you use parens to indicate the part to keep.

I have a lot to learn about regex patterns, it appears.

Chicks!

We have chicks. I think we've had them for about a week, but given where the nest is, it was hard to tell until they got large enough to sometimes pop up over the edges. I first saw small beaks on Friday: Read more…

If someone has to die, why not choose the one subject to the death penalty?

There is a passage in the Jerusalem talmud (Yerushalmi Terumah 8:4) that says: if pirates board a boat and say "give us one of you to kill and we'll let the rest go", and one of the group happens to be subject to the death penalty already anyway, you still can't turn him over to save everybody else. A question on Mi Yodeya asks: why not? He's dead anyway, so why can't you save the group through him?

I answered: Read more…

Robin update (pictures)

Today when I came home the mom-bird wasn't in the nest, but as I approached my door she swooped in to monitor me.

robin on fencepost, head-on

Read more…

Bird identified

Tonight I looked out to see the nest empty, so I fetched the ladder to peek inside. I came outside (with the ladder) to the sound of a bird chastising me loudly (before I'd gotten near the nest). The bird was perched on my fence, watching me, so I've finally seen more than the head and tail.

Yup, robin:

robin on fencepost

According to what I found in searching, a robin lays one egg a day to a total of four, then incubates them for 12-14 days. So we should get chicks in a week to ten days. Cool!

That reminds me: have a live feed of nesting eagles in Estonia (visible during their daylight). I've only seen one of the adult pair so far, but there's a fuzzy chick in there.

Backyard visitor

This visitor showed up last week just outside my back door. (That's a porch-roof support the nest is sitting on.) The first few days she took off as soon as I opened the door to enter or leave, no matter how gentle I was about it, but since Sunday my comings and goings have not disturbed her. I assume there are eggs and that protecting them is more important than fleeing me.

nest from below, dark head visible

I took that picture this morning and the colors are true (no adjustments), though it was in shade. I took the following one this evening and adjusted for longer exposure because it was in shadows (but this one shows more of the body):

nest from other side, head and tail visible

I estimate the bird to be about 8" from beak to tail. I've never seen the wings or belly clearly (just the blur of hasty retreat those first few days).

What kind of bird is this? I looked up some sites that list common western-PA birds and, among the pictures I found there, this seems closest to the downy woodpecker. But it doesn't seem especially downy, and those white rings around the eyes don't match any pictures I found. Some woodpeckers have white stripes, so maybe this is just a variation. The beak looks about right for some sort of woodpecker, as opposed to the smaller beaks on some other birds.