For educational reasons I've decided to create my own CA. Here is what I learned.
Lets get some context first.
// Using the Jenkins Groovy Post build plugin to execute the following after every build | |
// https://wiki.jenkins-ci.org/display/JENKINS/Groovy+Postbuild+Plugin | |
// It would be nice not to have to specify these here... the repo name should be available within the hudson | |
// api somehow, but I didn't know how to get it. The access token should maybe be saved in a config file, and | |
// read in at runtime? | |
GITHUB_REPO_NAME = 'myusername/myreponame' | |
GITHUB_ACCESS_TOKEN = 'my_github_api_v3_access_token' |
#!/usr/bin/env python | |
"""Merge multiple JUnit XML results files into a single results file.""" | |
# MIT License | |
# | |
# Copyright (c) 2012 Corey Goldberg | |
# | |
# Permission is hereby granted, free of charge, to any person obtaining a copy | |
# of this software and associated documentation files (the "Software"), to deal |
#!/bin/bash | |
export PW=`pwgen -Bs 10 1` | |
echo "$PW" > password | |
# Create a self signed certificate & private key to create a root certificate authority. | |
keytool -genkeypair -v \ | |
-alias clientCA \ | |
-keystore client.jks \ |
#!/bin/bash | |
export PW=`cat password` | |
# Create a self signed key pair root CA certificate. | |
keytool -genkeypair -v \ | |
-alias exampleca \ | |
-dname "CN=exampleCA, OU=Example Org, O=Example Company, L=San Francisco, ST=California, C=US" \ | |
-keystore exampleca.jks \ | |
-keypass:env PW \ |
Make sure you have installed Homebrew and (Homebrew-Cask)[http://caskroom.io/].
# Install Homebrew
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
# Install Homebrew-cask
brew install caskroom/cask/brew-cask
#!/usr/bin/env bash | |
# @author Andres Hermosilla | |
# @notes | |
# Jenkins ssl | |
# http://balodeamit.blogspot.com/2014/03/jenkins-switch-to-ssl-https-mode.html | |
# https://www.digitalocean.com/community/tutorials/how-to-configure-nginx-with-ssl-as-a-reverse-proxy-for-jenkins | |
# @todo | |
# - Setup security with LDAP | |
# - Add optional systems such as selenium |
get_latest_release() { | |
curl --silent "https://api.github.com/repos/$1/releases/latest" | # Get latest release from GitHub api | |
grep '"tag_name":' | # Get tag line | |
sed -E 's/.*"([^"]+)".*/\1/' # Pluck JSON value | |
} | |
# Usage | |
# $ get_latest_release "creationix/nvm" | |
# v0.31.4 |
#!/usr/bin/env python3 | |
""" | |
License: MIT License | |
Copyright (c) 2023 Miel Donkers | |
Very simple HTTP server in python for logging requests | |
Usage:: | |
./server.py [<port>] | |
""" | |
from http.server import BaseHTTPRequestHandler, HTTPServer |