Added Execution build docker agent jenkins files
This commit is contained in:
32
ExecutionAgentUbuntuJenkinsfile
Normal file
32
ExecutionAgentUbuntuJenkinsfile
Normal file
@@ -0,0 +1,32 @@
|
||||
pipeline {
|
||||
agent {label 'docker-ubuntu-agent'}
|
||||
|
||||
tools {
|
||||
// Install the Maven version configured as "M3" and add it to the path.
|
||||
maven "M3"
|
||||
}
|
||||
|
||||
stages {
|
||||
stage('Checkout') {
|
||||
steps {
|
||||
// Get some code from a GitHub repository
|
||||
git 'https://github.com/jglick/simple-maven-project-with-tests.git'
|
||||
}
|
||||
}
|
||||
stage('Build'){
|
||||
steps {
|
||||
// Run Maven on a Unix agent.
|
||||
sh "mvn -Dmaven.test.failure.ignore=true clean package"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
post {
|
||||
// If Maven was able to run the tests, even if some of the test
|
||||
// failed, record the test results and archive the jar file.
|
||||
success {
|
||||
junit '**/target/surefire-reports/TEST-*.xml'
|
||||
archiveArtifacts 'target/*.jar'
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user