Skip to content

Instantly share code, notes, and snippets.

@wallyatkins
wallyatkins / automate.md
Last active June 3, 2026 14:37
Trigger Jenkins Build From Jira - Send Issue Key and ID to Jenkins - Retrieve Jira Dev Status

The idea behind this gist is to capture the concept of utilizing the Jira Project Automation to create a testable deployment. Here are the general steps:

  • Jira: when an issue is transition to a "TESTING" status its triggers a build of the related git repository and branch
  • Jenkins: receives a parameter for the Jira ticket ID and retrieves the ticket's dev-status then builds and pushes an image and lastly updates a Helm Chart
  • RKE2: Rancher environment monitors git repository containing the Helm Chart to pull new image for application testable deployment
  • Email: Testers are notified that testable deployment is available

Jira - Issue Transitioned

Webhook URL

https://{JENKINS_HOST}/job/{JOB_NAME}/job/{SUB_JOB_NAME}/buildWithParameters?ticket_key={{issue.key}}&ticket_id={{issue.id}}

function setup() {
createCanvas(windowWidth, windowHeight);
background(255);
var DOTS_IN_ROWS = 10;
var DOTS_IN_COLS = 10;
var GAME_SIZE = windowHeight;
// check for phones (tall screens)
#include <stdio.h>
int main(void)
{
int count;
for (count = 0;count <= 500; count++)
printf("I will not throw paper airplanes in class.");
return 0;
}
// Bonfire: Map the Debris
// Author: @dfu23
// Challenge: http://www.freecodecamp.com/challenges/bonfire-map-the-debris?solution=function%20orbitalPeriod(arr)%20%7B%0A%20%20var%20GM%20%3D%20398600.4418%3B%0A%20%20var%20earthRadius%20%3D%206367.4447%3B%0A%20%20%0A%20%20for%20(var%20i%20%3D%200%3B%20i%20%3C%20arr.length%3B%20i%2B%2B)%20%7B%0A%20%20%20%20var%20answer%20%3D%20(Math.PI%20*%202)%20*%20Math.sqrt(Math.pow(earthRadius%20%2B%20arr%5Bi%5D.avgAlt%2C%203)%20%2F%20GM)%3B%0A%20%20%20%20delete%20arr%5Bi%5D.avgAlt%3B%0A%20%20%20%20arr%5Bi%5D.orbitalPeriod%20%3D%20Math.round(answer)%3B%0A%20%20%7D%0A%20%20%0A%20%20return%20arr%3B%0A%7D%0A%0AorbitalPeriod(%5B%7Bname%20%3A%20%22sputnik%22%2C%20avgAlt%20%3A%2035873.5553%7D%5D)%3B%0A
// Learn to Code at Free Code Camp (www.freecodecamp.com)
function orbitalPeriod(arr) {
var GM = 398600.4418;
var earthRadius = 6367.4447;
for (var i = 0; i < arr.length; i++) {
@wallyatkins
wallyatkins / archive-gitolite-repos.sh
Created August 5, 2013 18:32
This is a quick script that will archive all of your git repositories managed with gitolite into zip files. This script "works for me" to just archive the master branch of the repositories. There are probably some more elegant ways to do these operations or the gitolite configuration might vary from how I do mine ... feel free to make suggestion…
#!/bin/bash
# This script reads a gitolite.conf file to gather a list of all the repositories.
# The script then iterates through all of the repositories names. It then clones only
# the master branch of each repository (git version >= 1.7.10) and then archives the
# repository into a zip file.
if [[ "$1" = "" || "$2" = "" || "$3" = "" ]]; then
echo "Usage: $0 <full path to gitolite.conf> <full path to archive dir> <git clone prefix>" 1>&2
exit 1