With Puppet:
puppet module install rtyler-jenkins
puppet apply -v -e "include jenkins"
# Package Maintainer: Increment phusion_release to match latest release available | |
%define phusion_release 2011.03 | |
Summary: Ruby Enterprise Edition (Release %{phusion_release}) | |
Name: ruby-enterprise | |
Vendor: Phusion.nl <[email protected]> | |
Packager: Adam Vollrath <[email protected]> | |
Version: 1.8.7 | |
Release: 8%{dist} | |
License: Ruby or GPL v2 |
''' | |
If you allways endup googleing how to code down relative paths inside django's | |
settings.py file using the os.path module, you should consider bookmarking this | |
code snippet | |
Usage inside settings.py: | |
SITE_ROOT = site_root_path(__file__) | |
. | |
. | |
. |
#!/usr/bin/env ruby | |
require 'rubygems' | |
require 'bundler' | |
require 'fileutils' | |
require 'net/http' | |
require 'net/https' | |
require 'uri' | |
TMP_DIR = "/tmp/gems" |
#!/bin/sh | |
#---- | |
# bootstrap fedora18 | |
#release=$(cat /etc/fedora-release | awk '/^Fedora/ {print $3}') | |
#arch=$(arch) | |
release=18 | |
arch=x86_64 | |
ROOTFS=/rootfs/fedora$release-$arch |
# Assumptions: easyrsa3 available in current dir, and functional openssl. | |
# This basic example puts the "offline" and "sub" PKI dirs on the same system. | |
# A real-world setup would use different systems and transport the public components. | |
# Build root CA: | |
EASYRSA_PKI=offline ./easyrsa init-pki | |
EASYRSA_PKI=offline ./easyrsa build-ca nopass | |
# Build sub-CA request: | |
EASYRSA_PKI=sub ./easyrsa init-pki |
Shut down foreman-tasks:
service foreman-tasks stop
Open the rails console:
foreman-rake console
If a project has to have multiple git repos (e.g. Bitbucket and Github) then it's better that they remain in sync.
Usually this would involve pushing each branch to each repo in turn, but actually Git allows pushing to multiple repos in one go.
If in doubt about what git is doing when you run these commands, just
node { | |
echo 'Results included as an inline comment exactly how they are returned as of Jenkins 2.121, with $BUILD_NUMBER = 1' | |
echo 'No quotes, pipeline command in single quotes' | |
sh 'echo $BUILD_NUMBER' // 1 | |
echo 'Double quotes are silently dropped' | |
sh 'echo "$BUILD_NUMBER"' // 1 | |
echo 'Even escaped with a single backslash they are dropped' | |
sh 'echo \"$BUILD_NUMBER\"' // 1 | |
echo 'Using two backslashes, the quotes are preserved' | |
sh 'echo \\"$BUILD_NUMBER\\"' // "1" |
#!groovy | |
import groovy.json.JsonOutput | |
import groovy.json.JsonSlurper | |
def label = "mypod-${UUID.randomUUID().toString()}" | |
podTemplate(label: label, yaml: """ | |
spec: | |
containers: | |
- name: mvn | |
image: maven:3.3.9-jdk-8 |