Skip to content

Instantly share code, notes, and snippets.

View rlespinasse's full-sized avatar

Romain Lespinasse rlespinasse

View GitHub Profile
corporateProject(name: 'myproject')
@rlespinasse
rlespinasse / Jenkinsfile
Created October 26, 2017 11:00
Jenkins - Flyway Runner - Posgres
#!/usr/bin/env groovy
pipeline {
agent any
options {
// Basic options
timestamps()
disableConcurrentBuilds()
buildDiscarder(logRotator(numToKeepStr: '4'))
}
#!/usr/bin/env bash
set -e
listSwarms() {
ls ~/.horde
}
initSwarm() {
mkdir -p ~/.horde/$1
@rlespinasse
rlespinasse / Jenkinsfile.groovy
Last active September 26, 2019 11:36
Jenkinsfile to tag the sources used by current build
node {
repositoryAccess = 'https://'
repositoryAccessSeparator = '/'
echo "repository host: ${repositoryHost}" // github.com
echo "repository path: ${repositoryPath}" // <user>/<repository>.git
echo "repository jenkins credentials id: ${credentialsId}" // jenkins credentials for the jenkins git account who have commit access
echo "repository branch: ${branch}" // master or another branch
echo "repository commiter username: ${repositoryCommiterUsername}" // Jenkins account email
echo "repository commiter name: ${repositoryCommiterEmail}" // Jenkins
@rlespinasse
rlespinasse / chocolatey_golo.md
Last active January 14, 2016 22:32
HOW-TO: Update the verions of golo-lang on Chocolatey

Update the versions of golo-lang on Chocolatey

Retrieve information

  • Get the url of the distribution archive for the new release
  • Get the url of the blog post about the new release

Propose the pull request for the release

@rlespinasse
rlespinasse / homebrew_golo.md
Last active March 2, 2016 11:28
HOW-TO: Update the verions of golo-lang on Homebrew

Update the versions of golo-lang on Homebrew

Retrieve information

  • Get the url of the distribution archive for the new release
  • Get the sha256 of this archive (like shasum -a 256 {archive})

Propose the pull request for the release

@rlespinasse
rlespinasse / .gitignore
Created January 4, 2016 15:09
Jenkins configuration backup
# untrack all files and folders
/*
# Except the jenkins configuration
!/config.xml
# Except the jenkins plugin configurations
!/hudson*.xml
# Except this file
@rlespinasse
rlespinasse / substring.golo
Last active August 29, 2015 14:26
substring.golo
module substring
augment java.lang.String {
function substring = |this, separator| {
return this: substring(0, this: indexOf(separator) + separator: length())
}
}
function main = |args| {
println("abcdefgh": substring(0, 5)) // abcde
@rlespinasse
rlespinasse / Makefile
Created May 21, 2015 20:45
kata roman numerals in Go
all: testAndCover
testAndCover:
@go test -coverprofile=cover.out .
@go tool cover -html=cover.out
@rlespinasse
rlespinasse / keybase.md
Created December 5, 2014 08:57
Keybase proof

Keybase proof

I hereby claim:

  • I am rlespinasse on github.
  • I am rlespinasse (https://keybase.io/rlespinasse) on keybase.
  • I have a public key whose fingerprint is 871E 61C6 7483 438C B38F C050 9753 B4DB 701F 1EE9

To claim this, I am signing this object: