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.
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' |
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: |
# 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 |
++ 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 |
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 ''' |
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, |
I hereby claim:
To claim this, I am signing this object:
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" | |
} | |