Skip to content

Instantly share code, notes, and snippets.

@abelboldu
abelboldu / jenkins-scripts
Created July 17, 2015 08:06
Jenkins scripts n tricks
// CLEAN JOB BUILDS //
// change this variable to match the name of the job whose builds you want to delete
def jobName = "Your Job Name"
def job = Jenkins.instance.getItem(jobName)
job.getBuilds().each { it.delete() }
// uncomment these lines to reset the build number to 1:
//job.nextBuildNumber = 1
//job.save()
@abelboldu
abelboldu / bsd lessons
Last active December 19, 2015 13:41
Dragonfly BSD, things learned
* pkg is the package manager
* build Dports tree:
# cd /usr
# make dports-create-shallow
*
Follow https://www.dragonflybsd.org/docs/how_to_get_to_the_desktop/
to install mate
@abelboldu
abelboldu / ost_smoketest.sh
Last active July 16, 2018 23:36
Openstack quick smoke test
#!/bin/bash
echo "Installing dependencies..."
APT=`command -v apt-get` || true
YUM=`command -v yum` || true
if [[ "$APT" != "" ]]; then
apt-get update > /dev/null; sudo apt-get install -qqy sshpass > /dev/null
elif [[ "$YUM" != "" ]]; then
yum -y install sshpass >> /dev/null
else
echo "Distro unsupported."
@abelboldu
abelboldu / digitalocean.py
Created April 26, 2018 12:24
Digital Ocean inventory
#!/usr/bin/env python2
'''
DigitalOcean external inventory script
======================================
Generates Ansible inventory of DigitalOcean Droplets.
In addition to the --list and --host options used by Ansible, there are options
for generating JSON of other DigitalOcean data. This is useful when creating