DevOps

Git Stash

I’ve found the git stash command to be most helpful during my regular working days. These are summary of some of the ways I use it. Stash your Work in Progress (WIP) The simplest way to use it is to just run git stash. This will take all your changes and apply it to the stash stack. Applying the WIP from the Stash If you want to just get that stash back, just run git stash pop.

Docker Entrance

How to enter into a Docker Container or Image

Sometimes I need to troubleshoot running containers or spin up an image then check on something that got built. These are the simple commands I run to ensure that I can get into the container or image, check what I need to do and get out. Container Entrance (easy) Lets say you have an container that you want to see what is on it, you should be able to spin it up and enter into a command line interface.

Groovy Linting

Groovy Linting Tools

I’m currently working on a Jenkins-based CI Automation Server. When developing a new CI pipeline, I always advocate for the Pipeline to be configured as code. This allows it to be reviewed before applying it and introduces a historical change set. I’ve not made complex Jenkins scripts before, but this was required for this project. So, what is the problem with this process? Well, I’ve never really worked with Groovy before and needed to understand the programming language.

Bash For Loops

Looping in a Bash Script

I run into a a bunch of situation where I have to loop over outputs from cli outputs in Bash scripts. I can never remember where to find this information, so I’ll document it here. This is just an example of what I typically need to do: Using read in a for loop Get a long running command output, for this example, I’ll just use the output from a find command: