Last active
February 13, 2018 09:19
-
-
Save kameshsampath/7afdb7aa9f6568af5bdd097fd07c8482 to your computer and use it in GitHub Desktop.
OpenShift Maven Mirror Pod template Jenkinsfile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
podTemplate(name: 'maven33', label: 'maven33', cloud: 'openshift',serviceAccount: 'jenkins', containers: [ | |
containerTemplate(name: 'jnlp', | |
image: 'openshift/jenkins-slave-maven-centos7', | |
workingDir: '/tmp', | |
envVars: [ | |
envVar(key: 'MAVEN_MIRROR_URL',value: 'http://nexus.infra:8081/nexus/content/groups/public/') | |
], | |
cmd: '', | |
args: '${computer.jnlpmac} ${computer.name}') | |
]){ | |
node("maven33") { | |
checkout scm | |
stage("Test") { | |
sh "mvn test" | |
} | |
stage("Deploy") { | |
sh "mvn -Popenshift -DskipTests clean fabric8:deploy" | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment