- Download script
travis-encrypt.sh
- Make it executable
chmod +x travis-encrypt.sh
- Run the script with
./travis-encrypt.sh -r username/repositoryname -e example
- It will return something like
O+woVD9K+PeFrcyu5GCjKSFvfcSPwDW0kyDYEQnNbwt/iSkqjpl2OPA9W//KEKEB9UUSZD+XmQ3Ij0gnvJnOowcWY5sSeJlVEVTrSer0kW6uWpa/uWzDHCBz2YhBnI6u9SfYfMkhDl22pcaCEwaUkmK2gjcVo+v0bS8vAQFz0Na5/WiKj0GkSX50iIGgfaXheuC8KgIC25T0h+czpap7vb13OlblMnClfyTH9+TmAwTlcV7ljXpv1QY+K72L8jK1/CQVZ8quBYrBwwxO2V6cpXRMMCIw4m4lqxUyN4FBGnq7cJ7BWLzeqSMpFBoP+ZxAqS5yem8KLh1VkEo7PVjCkZE6M+2meFf2VJEVUs/KJY9xnH3eDzipWkwXon2qVpCkT7FDEzGFs/DapYsSo7eCO6pUYYhcpaYpWeYV9DSSV0QcrOeZp664iJMHWPSmrs/lESbbHpKWsM/AFVB9X75q/OB+QU0tQxpReZmKw3ZHbDVMlmlwhP8VSiQ05LV2W6gYzADGiUiL6n1X8teeHEVDSZnD7nrxMD/FchnWI5La3tZeFovRMf6hH3NItW+QZaGaGNftJrP488J/F2hCycPJk3+YrxbBCGHE2X379QbkMz3S0B5UiAcJKmwuTstF6X3CCurZVYIkUGGXhnmalPtVpEqxeTiLw5RU6C9z2qSwhhw=
- It will return something like
- Use the encrypted secret in your
.travis.yml
according to https://docs.travis-ci.com/user/encryption-keys/#Usage
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/ruby | |
require 'rubygems' | |
require 'json' | |
require 'yaml' | |
user = ARGV[0] || %x{id -u -n}.strip | |
if user == 'root' | |
dir = '/opt/puppetlabs/puppet/cache/client_data/catalog/' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'spec_helper' | |
# Example rspec_puppet function rspec test (i.e. subject is the function 'min') | |
# This works for other rspec subjects as well as a compiler is always involved. | |
# This kind of mocking can be required when it is not enough to simply override | |
# a function with another implementation (which can be done with a `let(:pre_condition) { 'function min($x, $y) { ... }'}` | |
# | |
# The main difficulty that this overcomes is the need to let the compiler initialize and | |
# create the context in which it will operate before making any mocks. | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# | |
# adapted from https://gist.github.com/mitsuji/8397836 | |
# | |
# For usage, run without arguments | |
# | |
VM_NAME=$1 | |
DVD_PATH=${2:---} | |
OS_TYPE="${3:-${OS_TYPE:-RedHat_64}}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh -e | |
# To the extent possible under law, Viktor Szakats (vszakats.net) | |
# has waived all copyright and related or neighboring rights to this | |
# script. | |
# CC0 - https://creativecommons.org/publicdomain/zero/1.0/ | |
# This script will create a self-signed root certificate, along with a code | |
# signing certificate in various formats, trying to use the best available | |
# crypto/practice all along. Then, it will create a test executable and code |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# GIST_URL: https://gist.github.com/natemccurdy/797fa9128b7eef1f07be | |
# This script can be run to manually trigger Code Manager to deploy code from your control-repo. This sort of | |
# thing is neccesary when, for example: | |
# - You've turned on Code Manager but have not yet made an RBAC token. | |
# - You want to pull down the latest version of a Puppetfile module without pushing to your GMS. | |
# - Something has broken the post-receive hook on your GMS that would've triggered Code Manager. | |
# - Syntax errors in your Puppetfile prevent you from retrieving those fixes to that Puppetfile. | |
# - Puppetserver has crashed due to file-sync issues between code and code-staging. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Vagrantfile for testing | |
# | |
Vagrant::configure("2") do |config| | |
# the Chef version to use | |
config.omnibus.chef_version = "11.4.4" | |
def configure_vbox_provider(config, name, ip, memory = 384) | |
config.vm.provider :virtualbox do |vbox, override| |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
require 'json' | |
require 'yaml' | |
require 'tmpdir' | |
# Your GitHub Username | |
USERNAME='trevor-vaughan' | |
gerrit_url = %(ssh://#{USERNAME}@review.gerrithub.io:29418/) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
require 'rubygems' | |
require 'eventmachine' | |
require 'em-ssh' | |
require 'amqp' | |
EM.run do | |
Signal.trap("INT") do | |
EM.stop |
NewerOlder