diff --git a/ExecutionAgentAlpineJenkinsfile b/ExecutionAgentAlpineJenkinsfile new file mode 100644 index 0000000..b03029d --- /dev/null +++ b/ExecutionAgentAlpineJenkinsfile @@ -0,0 +1,32 @@ +pipeline { + agent {label 'docker-alpine-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' + } + } +} \ No newline at end of file diff --git a/ExecutionAgentDebianJenkinsfile b/ExecutionAgentDebianJenkinsfile new file mode 100644 index 0000000..694a7b1 --- /dev/null +++ b/ExecutionAgentDebianJenkinsfile @@ -0,0 +1,33 @@ +pipeline { + agent {label 'docker-debian-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' + } + } +} + diff --git a/ExecutionAgentUbuntuJenkinsfile b/ExecutionAgentUbuntuJenkinsfile new file mode 100644 index 0000000..21e1490 --- /dev/null +++ b/ExecutionAgentUbuntuJenkinsfile @@ -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' + } + } +} \ No newline at end of file