Skip to content

Instantly share code, notes, and snippets.

View cyrille-leclerc's full-sized avatar

Cyrille Le Clerc cyrille-leclerc

View GitHub Profile
@cyrille-leclerc
cyrille-leclerc / jenkins-workflow-with-vagrant-and-puppet.groovy
Created November 19, 2014 15:32
Jenkins Workflow with Vagrant and Puppet
stage name: 'BUILD', concurrency: 1
node('local-slave-1') {
ws { // COMPILE AND JUNIT
git url: 'https://github.com/cyrille-leclerc/spring-petclinic.git'
env.PATH = "${tool 'Maven 3.x'}/bin:${env.PATH}"
sh 'mvn -o -Dmaven.test.skip=true package'
archive 'src, target/petclinic.war'
step([$class: 'Fingerprinter', targets: 'target/petclinic.war'])
// step $class: 'hudson.tasks.junit.JUnitResultArchiver', testResults: 'target/surefire-reports/*.xml'
@cyrille-leclerc
cyrille-leclerc / bosh-deploy-logs
Created March 3, 2015 11:17
bosh task 55 --debug
Director task 55
INFO DirectorTask : Director Version : 1.2776.0
INFO DirectorTask : Enqueuing task: 55
I, [2015-03-03 11:06:49 #2199] [] INFO -- DirectorJobRunner: Looking for task with task id 55
D, [2015-03-03 11:06:49 #2199] [] DEBUG -- DirectorJobRunner: (0.000714s) SELECT * FROM "tasks" WHERE "id" = 55
I, [2015-03-03 11:06:49 #2199] [] INFO -- DirectorJobRunner: Starting task: 55
I, [2015-03-03 11:06:49 #2199] [task:55] INFO -- DirectorJobRunner: Creating job
I, [2015-03-03 11:06:49 #2199] [task:55] INFO -- DirectorJobRunner: Reading deployment manifest
D, [2015-03-03 11:06:49 #2199] [task:55] DEBUG -- DirectorJobRunner: Manifest:
@cyrille-leclerc
cyrille-leclerc / sshd_config_2824
Created March 26, 2015 11:58
sshd_config bosh-stemcell vsphere-esxi-ubuntu-trusty-go_agent (2824, 2889 and 2891)
# Package generated configuration file
# See the sshd_config(5) manpage for details
# What ports, IPs and protocols we listen for
Port 22
# Use these options to restrict which interfaces/protocols sshd will bind to
#ListenAddress ::
#ListenAddress 0.0.0.0
Protocol 2
# HostKeys for protocol version 2
@cyrille-leclerc
cyrille-leclerc / packer-azure.log
Created April 13, 2015 22:07
packer-azure SSL timeout
This file has been truncated, but you can view the full file.
++ export PACKER_LOG=true
++ PACKER_LOG=true
++ packer build -var-file my-azure-settings.json -only=azure jenkins-enterprise-packer.json
2015/04/13 23:57:08 [INFO] Packer version: 0.7.5 9cd66feeacbd9cb318b72eb5ed59428c5b8c37ac+CHANGES
2015/04/13 23:57:08 Packer Target OS/Arch: darwin amd64
2015/04/13 23:57:08 Built with Go Version: go1.3.3
2015/04/13 23:57:08 [DEBUG] Discoverd plugin: amazon-chroot = /usr/local/bin/packer-builder-amazon-chroot
2015/04/13 23:57:08 [DEBUG] Discoverd plugin: amazon-ebs = /usr/local/bin/packer-builder-amazon-ebs
2015/04/13 23:57:08 [DEBUG] Discoverd plugin: amazon-instance = /usr/local/bin/packer-builder-amazon-instance
2015/04/13 23:57:08 [DEBUG] Discoverd plugin: azure = /usr/local/bin/packer-builder-azure
@cyrille-leclerc
cyrille-leclerc / jenkins-workflow.groovy
Last active October 29, 2015 20:16
Jenkins Workflow code snippet to deploy a java-maven web app to Cloud Foundry runtime using CloudBees Cloud Foundry CLI Plugin
node() {
stage 'BUILD'
git url:'https://github.com/cyrille-leclerc/spring-petclinic.git'
env.PATH = "${tool 'Maven (latest)'}/bin:${env.PATH}"
env.PATH = "${tool 'CloudFoundry CLI 6.9.0-cloudbees-1'}:${env.PATH}"
withCredentials([[$class: 'UsernamePasswordMultiBinding', credentialsId: 'pws-credentials-id',
usernameVariable: 'USERNAME', passwordVariable: 'PASSWORD']]) {
stage concurrency: 1, name: 'DEPLOY'
sh '''
@cyrille-leclerc
cyrille-leclerc / jenkins-cloudfoundry-cli-workflow.groovy
Last active January 24, 2017 17:25
Jenkins Workflow with Cloud Foundry CLI
node {
git 'https://github.com/CloudBees-community/spring-petclinic.git'
env.PATH = "${tool 'Maven 3.2.2'}/bin:${env.PATH}"
sh 'mvn package'
wrap([$class: 'CloudFoundryCliBuildWrapper',
apiEndpoint: 'https://api.hackney.cf-app.com',
skipSslValidation: true,
@cyrille-leclerc
cyrille-leclerc / 00 Readme.md
Last active October 1, 2015 14:05
Jenkins Amazon ECS plugin not found

Context: fresh Jenkins OSS LTS (1.609.3)

The "Amazon EC2 Container Service" plugin appears in the plugin manager but I get a 404 during the install.

Plugin Manager - install Amazon EC2 Container Service

@cyrille-leclerc
cyrille-leclerc / keybase.md
Created October 28, 2015 19:47
keybase.md

Keybase proof

I hereby claim:

  • I am cyrille-leclerc on github.
  • I am cleclerc (https://keybase.io/cleclerc) on keybase.
  • I have a public key whose fingerprint is 9F90 3E3B 8EB3 C386 F1D9 A197 C507 2F45 8EC6 6EBF

To claim this, I am signing this object:

@cyrille-leclerc
cyrille-leclerc / jenkins-workflow.groovy
Last active August 31, 2023 21:52
Jenkins Docker Workflow - Deploy Game Of Life to Amazon EC2 Container Service / ECS
docker.withRegistry('', 'dockerhub-credentials-cleclerc') {
writeFile file: "${pwd()}/.m2/settings.xml", text: "<settings><localRepository>${pwd()}/.m2/repo</localRepository></settings>"
stage 'Build Web App'
docker.image('cloudbees/java-build-tools:0.0.5').inside {
git 'https://github.com/cyrille-leclerc/game-of-life.git'
sh "mvn -B -V -s ${pwd()}/.m2/settings.xml clean package"
}