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 / README.md
Last active March 18, 2016 19:00
Cyrille's Azure CLI Tips

Switch to ASM mode (classic)

$ azure config mode asm
info:    Executing command config mode
info:    New mode is asm
info:    config mode command OK
@cyrille-leclerc
cyrille-leclerc / Jenkinsfile
Created January 19, 2016 09:12
Jenkinsfile for Cloud Foundry
#!groovy
docker.image('cloudbees/java-build-tools:0.0.5').inside {
checkout scm
def mavenSettingsFile = "${pwd()}/.m2/settings.xml"
stage 'Build Web App'
wrap([$class: 'ConfigFileBuildWrapper',
managedFiles: [[fileId: 'maven-settings-for-gameoflife', targetLocation: "${mavenSettingsFile}"]]]) {
@cyrille-leclerc
cyrille-leclerc / Jenkinsfile
Last active December 6, 2016 14:43
Jenkinsfile Maven - Game of Life
#!groovy
# https://github.com/cyrille-leclerc/game-of-life/blob/jenkinsfile/Jenkinsfile
docker.image('cloudbees/java-build-tools:0.0.6').inside {
checkout scm
def mavenSettingsFile = "${pwd()}/.m2/settings.xml"
stage 'Build Web App'
wrap([$class: 'ConfigFileBuildWrapper',
@cyrille-leclerc
cyrille-leclerc / 0-README.md
Last active January 20, 2017 09:45
Exception with Selenium running in Docker
docker run -it 62ce0736f1fc bash

python
from selenium import webdriver
@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 / 1-maven-spy-mvn_release_clean.log.xml
Created February 2, 2017 22:09
Jenkins Pipeline Maven Plugin - Maven Spy - release:clean release:prepare release:perform
<?xml version="1.0" encoding="UTF-8"?>
<mavenExecution _time="2017-02-02 23:02:52.2">
<context _time="2017-02-02 23:02:52.205">
<systemProperties />
<versionProperties />
<workingDirectory />
<userProperties />
<plexus />
</context>
<!-- 2017-02-02 23:02:52.206 - new File(.): -->
@cyrille-leclerc
cyrille-leclerc / 0-README.md
Created February 5, 2017 09:41
jenkins pipeline maven - multi-module-maven-project
@cyrille-leclerc
cyrille-leclerc / 0-README.md
Last active February 5, 2017 19:01
Exception: no junit report found
node {
    withMaven(globalMavenSettingsConfig: 'my-global-maven-settings', mavenSettingsConfig: 'my-maven-settings') {
       git "https://github.com/spring-projects/spring-petclinic.git"
       sh "mvn clean package -DskipTests"
       
    }
}
@cyrille-leclerc
cyrille-leclerc / 0-README.md
Last active February 5, 2017 19:03
Pipeline Maven - multi-module-maven-project - junit error
node {
    withMaven(globalMavenSettingsConfig: 'my-global-maven-settings', mavenSettingsConfig: 'my-maven-settings') {
       git "https://github.com/cyrille-leclerc/multi-module-maven-project.git"
       sh "mvn -Dcom.example.demo2.Demo2ApplicationTests.fail=true clean install"
    }
}
@cyrille-leclerc
cyrille-leclerc / workflow.groovy
Created November 5, 2014 14:58
W-JAX 14- Pimp Your Continuous Delivery Pipeline with the New Jenkins Workflow Engine
def qaCatalinaBase = '/opt/apache-tomcat-8-qa'
def qaHttpPort = 8081
def stagingCatalinaBase = '/opt/apache-tomcat-8-staging'
def stagingHttpPort = 8082
def perfsCatalinaBase = '/opt/apache-tomcat-8-perfs'
def perfsHttpPort = 8084
def productionCatalinaBase = '/opt/apache-tomcat-8-production'