Last active
September 27, 2018 16:44
-
-
Save kenrachynski/950ff416996f18da5f461ec2793d8a4b to your computer and use it in GitHub Desktop.
Adding Maven to pipeline
This file contains hidden or 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
| #!/usr/bin/env Groovy | |
| pipeline { | |
| agent any | |
| tools { | |
| maven 'Maven35' | |
| } | |
| stages { | |
| stage('Build') { | |
| sh 'mvn -B -V clean deploy' | |
| } | |
| } | |
| } |
This file contains hidden or 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
| #!/usr/bin/env groovy | |
| node() { | |
| withEnv(["PATH+MAVEN = ${tool 'Maven35'}/bin"]) { | |
| sh 'mvn -B -V clean deploy' | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment