Saturday, February 15, 2014

Execute SSH command as root from a Jenkins build without using keys

page has moved

This page has moved to a

Tuesday, October 29, 2013

Alan Kay, Pioneer of GUI's, Graphics and Object-Oriented Programming, 1987 Video

page has moved

This page has moved to a

Sunday, October 27, 2013

CloudBees Palo Alto 2013 Jenkins User Conference (JUC)

The 2013 Jenkins User Conference (JUC) held in Palo Alto last week was both educational and inspirational. Kohsuke, creator of Jenkins, gave the keynote speech and two tracks for presentations followed, affording a variety of content to choose from. I was fortunate to meet attendees from Netflix, Evernote, VMware, Tesla as well as others in the DevOps community using Jenkins and find out what they were up to with regards to Continuous Integration and Delivery (CI/CD).

Kohsuke's keynote speech

This is the JUC description from the CloudBees site:
The Jenkins User Conference focuses on Continuous Integration (CI) as the fundamental best practice for enterprise software development. Our presenters are experienced Jenkins open source developers, executives, business managers, architects and authors who are luminaries within the Jenkins community. They represent the many organizations around the world who are leveraging the use of Jenkins within the application development lifecycle.

Stas Zvinyatskovsky
(Presenter from Yahoo!)
My favorite session was presented by Stas Zvinyatskovsky from Yahoo! titled, "Implementing Continuous Delivery at Yahoo!" From what I've heard some or all of the talks will be posted online in the near future. Once they are posted I will update this article with a link.

A couple plugins and tools I learned about at the conference, which I'd like to check out included:

A delicious Jenkins cupcake
  • DSL plugin - The job-dsl-plugin allows the programmatic creation of projects using a DSL. Pushing job creation into a script allows you to automate and standardize your Jenkins installation, unlike anything possible before. 
  • Audit Trail plugin - Keep a log of who performed particular Jenkins operations, such as configuring jobs. 
  • Sonar plugin - SonarQube is an open platform to manage code quality.
  • Folders plugin - This plugin allows users to create "folders" to organize jobs. Users can define custom taxonomies (like by project type, organization type etc). Folders are nestable and you can define views within folders 
  • Monitoring plugin - Monitoring of Jenkins / Hudson itself with JavaMelody. Open the report (or [http://yourhost/monitoring]) after installation. 
  • Xcode plugin - This plugin adds the ability to call Xcode command line tools to automate build and packaging iOS applications (iPhone, iPad, ...). 
  • Liquibase - Source control for your DB

Saturday, October 26, 2013

Passing Jenkins Build Variables Using PowerShell's "invoke-command" Cmdlet

Sometimes it is the small things that can take up most of the time when I'm working with PowerShell scripts in Jenkins. I call this the PowerShell Pareto Principle! Usually it is a syntax issue that bites me, but recently I had trouble passing in build variables using the invoke-command cmdlet. This example should clear things up if you encounter the same perplexities which stumped me.

invoke-command your_remote_servername {param(

By using the ArgumentList argument of invoke-command you can pass in outside variables into the Jenkins PowerShell plugin, executing code targeted for a remote server running the WinRM service. That's Hot!™

Wednesday, October 16, 2013

HELP! : The Biggest Thing Missing From The Jenkins Continuous Integration System

Recently I've been doing a lot of automation work using Jenkins - so much that I haven't written much online for the past year. My biggest Jenkins complaint is the sparse documentation of the many features and plugins as well as finding articles which put build tasks together to create a "Rube Goldberg machine" of automated bliss.

For starters I recommend reading "The Jenkins Definitive Guide" O'Reilly book. (I'm guilty of not having finished the text myself and ought to heed my own advice!) While the book covers a breadth of topics, it is the little things (e.g. the syntax of calling a Powershell one-liner with spaces and quotes) that often take up a good chunk of time during the initial configuration of jobs and can frustrate even the most patient of implementors.

What I have found using continuous integration automation systems (cruise control, hudson/jenkins) over several years is that art can emerge amid a string of hacked together disparate processes. Yes, no doubt, sometimes a Jenkins job really is just a hodgepodge, ragtag group of mishmash scripts glued together to form a solution. However, every now and again great things develop, with the shifting and shuffling of build jobs, a beautiful process is born from the thickets. These elevated build chains can become a pragmatic example of CI and agile programming fundamentals put into practice, placing theory at the tip of a button push. What great satisfaction!

As I begin to journal on my Jenkins experiences, it is my hope that my whimsical writings may help others save time and frustrations in learning to use a wonderful automation framework, which may very well become the corner stone to your continuous integration automated processes, whether planned for or not! That is just how it goes sometimes when you combine automation with an open source executor in a suit willing to do your scripted bidding . (As an added bonus Jenkins will also do your job for you, take out the garbage and walk the dog - simultaneously.)

Monday, August 27, 2012

From 60 to 0 with Gmail Shortcuts

Welcome to Monday. This is what my inbox looked liked when I got in... the message list continues outside of the screen capture, but you get the idea:

Monday morning inbox of horrors.

If you are like me and crave the fabled inbox zero, then seek no more -- I can help you reduce and keep your Gmail inbox at a manageable level or zero if you prefer. All you have to do is invest a little time reading this article and try a couple practice keyboard shortcut sessions. Once the shortcuts are second nature you will be able to reduce your inbox message conversations from 60 to 0 in a matter of minutes. This is where I got in 10 minutes time:

Ahh, bliss - a clean inbox.

Before we start let's see why this strategy works:

Keyboard shortcuts save time. Exponentially.
Trust me... Really!

Usually the pain about learning keyboard shortcuts is that there are too many to take in all at once. This article shows you the exact keyboard shortcuts you need to learn for to efficiently reduce messages in your inbox. (If you don't know why you might want to have fewer messages in your inbox read David Allen's Getting Things Done book for starters.)

1. The first thing you'll want to setup is a Google Labs feature called Auto-advance found in your Gmail settings -> Labs. 

FYI: The image below shows the information relevant to this article in green, although I've also highlighted some areas in pink with settings/features I also find useful that happened to be in the same screenshot.

Auto-advance Labs Feature

Next, configure turn on Gmail keyboard shortcuts and configure the Auto-advance feature you installed in step 1.

Add some bling to your Settings.

Great now that your Gmail is setup, here are the keyboard shortcuts that you need for this task. Again focus on the green, which are relevant to this task, although I've also highlighted other frequently used shortcuts in pink. You might learn those once you are comfortable with the green commands.
Gmail Keyboard Shortcuts Help Menu (press '?' to see this)

Here's the list of the green items which are relevant for the clean-up task in text form along with a brief description of what each command does:
u -- Return to conversation list -- Refreshes your page and returns you to the inbox, or list of conversations.
k -- Move to newer conversation -- Opens or moves your cursor to a more recent conversation. You can hit to expand a conversation.
j -- Move to older conversation -- Opens or moves your cursor to the next oldest conversation. You can hit to expand a conversation.
o or <Enter> -- Open -- Opens your conversation. Also expands or collapses a message if you are in 'Conversation View.'
p -- Previous message -- Moves your cursor to the previous message. You can hit to expand or collapse a message. (Only applicable in 'Conversation View.')
n -- Next message -- Moves your cursor to the next message. You can hit to expand or collapse a message. (Only applicable in 'Conversation View.')
v -- Move to -- Moves the conversation from the inbox to a different label, Spam or Trash.
s -- Star a message or conversation -- Adds or removes a star to a message or conversation. Stars allow you to give a message or conversation a special status.
# -- Delete -- Moves the conversation to Trash.
r -- Reply -- Replies to the message sender. + r allows you to reply to a message in a new window. (Only applicable in 'Conversation View.')
a -- Reply all -- Replies to all message recipients. +a allows you to reply to all message recipients in a new window. (Only applicable in 'Conversation View.')
f -- forward -- Forwards a message. + f allows you to forward a message in a new window. (Only applicable in 'Conversation View.')
Tab then <Enter> -- Send message -- Combo key: After composing your message, use this combination to send it automatically.
z   -- Undo -- Undoes your previous action, if possible (works for actions with an 'undo' link).
Some of the shortcuts are intuitive and some will require getting used to. (The navigation key choices stem from Vi, so sysadmins rejoice!)

The clean-up process

  1. From inbox view, jump into a message using <Enter>. 
  2. Once on a message decide if I want to delete (#), move (v), reply/reply all/forward (r/a/f), or mark with a star (s - pushing repeatedly cycles through the star icons).

    GTD TIP: If the item is actionable I may decide to forward to Evernote if it is something I want to look at later, like an article, image or attachment or to ToodleDo if the message is really a task that I need to get done. Repeat with me: My inbox is not my task list, my inbox is not my task list, my inbox is not my task list!!!

    To make it easy to do these forwards add your Evernote and ToodleDo email accounts to your Gmail contacts so they appear in the To: pop-up when you need to send a message to a 3rd party service. Then use the tab+enter combo shortcut to send your message, sans mouse.

  3. Rinse and repeat.

You may have noticed the clean-up process only uses a subset of the keyboard shortcuts I highlighted in green as relevant to the task. This is because you really only need those other keys (ukjpn and z) to navigate comfortably while you are cleaning house. These navigation keys are definitely worth learning right away and will liberate your mouse hand.

If you decide to try this out please leave a comment to let me know how it goes. The only thing I can say about learning this technique for myself is: Why didn't I learn these shortcuts sooner!?

Monday, July 30, 2012

Work, Success and Happiness

“Happiness is an attitude. We either make ourselves miserable, or happy and strong. The amount of work is the same.”
                ~Francesca Reigler 

To be happy at work it really helps to love what you do. Unfortunately not all of us can say we love our work, but fear not! I've found some videos sure to increase motivation and interest in the work we do.

In these 3 TED videos you will hopefully find a renewed interest in whatever work you do and be inspired to make the world a better place!

Richard St. John's 8 secrets of success

Tuesday, July 17, 2012

Shock The Taskbar, Shock The Taskbar

I really don't like it
Shockin' the Taskbah
Shock the Taskbah

A few years back I caught a glimpse of a coworkers screen and noticed his Windows taskbar was in a funny location. I tried moving my own taskbar over to the side and immediately saw how much more useful the window titles were, now that I could partially see what they said. I generally keep my "sidebar" width around 3-4 mini icons.

So what are you waiting for?!
Get vertical!

Wednesday, July 11, 2012

Greenshot For My Screenshot

Greenshot is a free screen capture tool and is a must have if you still use your print screen button <PrtScn> and paste images into Paint and MS Word.

My favorite features in the Greenshot image editor include drawing shapes, obfuscating image areas, adding annotations and highlighting. 

Greenshot Editor Demo

After I take a Greenshot using the PrtScn button, I can directly paste this image into Gmail when I use Chrome. This combination is really efficient for saving words in an email by using an image.

Tuesday, July 3, 2012

Sort Your Way to a Trimmer Inbox in Outlook

Oftentimes I have messages in my inbox with matching subjects. These are usually easy targets for mass deletion. As I'm looking at what to trash, most of the time when my messages are in groups I generally only care about the last message and members with attachments.

First add the "conversations" field to the current view. To do so right-click on current view bar and "Customize":

Add the "conversation" field to the view

Then do the following to get sorted:
  • click "Conversation" tab to sort and group based on subjects
  • hold down <Shift> key throughout the rest of this process
  • click "Received" tab to sort based on this additional vector
  • click "Received" tab again to reverse the date sort, so newest messages are on top

Outlook Inbox messages sorted by conversation, received
Hopefully this sort tip will get your Outlook Inbox closer to "zero" in short order!