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 / 0-jenkins-pipeline-test-ami.groovy
Last active June 26, 2018 01:23
Jenkins Pipeline - Test AMI: launch VM, test and terminate
def ec2SecurityGroupId = "sg-cd5696a0"
docker.image('cloudbees/java-build-tools').inside {
wrap([$class: 'AmazonAwsCliBuildWrapper', credentialsId: 'aws-cleclerc-admin', defaultRegion: 'us-east-1']) {
stage "Launch EC2 VM"
sh "aws ec2 run-instances --image-id=${amiId} --instance-type=m3.medium --count 1 --key-name alliances-team --security-group-ids ${ec2SecurityGroupId} 2>&1 | tee .aws-run-instance-aws.json"
String awsRunInstanceLogs = readFile('.aws-run-instance-aws.json')
String instanceId = extractAwsInstanceIdFromAwsJson(awsRunInstanceLogs)
stage "Wait for EC2 VM"
@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 / 0-pipeline.groovy
Created August 15, 2016 15:52
Jenkins Maven Pipeline - Job Execution Details
node {
withMaven(mavenSettingsConfig: 'maven-settings-for-game-of-life', mavenInstallation: 'M3', jdk: 'Oracle JDK 8') {
git 'https://github.com/cyrille-leclerc/my-spring-boot-app.git'
sh "mvn clean package deploy"
}
}
@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 / 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
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
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: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 / 0-README.md
Created February 19, 2017 21:44
[JENKINS-42179] use the JAVA_TOOL_OPTIONS environment variable to pass `-Dmaven.ext.class.path`
@cyrille-leclerc
cyrille-leclerc / mvn.log
Created March 8, 2017 20:48
ReleaseFailureException: No SCM URL was provided to perform the release from
Apache Maven 3.3.9 (bb52d8502b132ec0a5a3f4c09453c07478323dc5; 2015-11-10T08:41:47-08:00)
Maven home: /usr/local/Cellar/maven/3.3.9/libexec
Java version: 1.8.0_121, vendor: Oracle Corporation
Java home: /Library/Java/JavaVirtualMachines/jdk1.8.0_121.jdk/Contents/Home/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "mac os x", version: "10.12.3", arch: "x86_64", family: "mac"
[DEBUG] Created new class realm maven.api
[DEBUG] Importing foreign packages into class realm maven.api
[DEBUG] Imported: javax.enterprise.inject.* < plexus.core
[DEBUG] Imported: javax.enterprise.util.* < plexus.core