Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save coreydaley/e77076a1d275be7610a46c3bf258af46 to your computer and use it in GitHub Desktop.
Save coreydaley/e77076a1d275be7610a46c3bf258af46 to your computer and use it in GitHub Desktop.
podTemplate(label: 'maven-build-pod',
cloud: 'openshift',
containers: [
containerTemplate(
name: 'jnlp', image: 'quay.io/openshift/origin-jenkins-agent-maven:4.13'
)
],
volumes: [persistentVolumeClaim(mountPath: '/home/jenkins/.m2', claimName: 'dependencies', readOnly: false) ]
) {
node("maven-build-pod") {
stage('Source Checkout') {
git url: "https://github.com/red-hat-storage/ocs-workloads.git"
script {
def pom = readMavenPom file: 'jenkins/maven01/pom.xml'
def version = pom.version
}
}
// Using Maven build the war file
stage('Build JAX-RS') {
echo "Building war file"
sh "mvn -f jenkins/maven01/pom.xml clean package -DskipTests=true"
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment