From f3f4d300719aaee0e0a5a734b6d8058c8fc6184d Mon Sep 17 00:00:00 2001 From: Guillem Hernandez Sola Date: Fri, 17 Apr 2026 10:54:23 +0200 Subject: [PATCH] Added Execution build docker agent jenkins files --- ExecutionAgentAlpineJenkinsfile | 32 ++++++++++++++++++++++++++++++++ ExecutionAgentDebianJenkinsfile | 33 +++++++++++++++++++++++++++++++++ ExecutionAgentUbuntuJenkinsfile | 32 ++++++++++++++++++++++++++++++++ 3 files changed, 97 insertions(+) create mode 100644 ExecutionAgentAlpineJenkinsfile create mode 100644 ExecutionAgentDebianJenkinsfile create mode 100644 ExecutionAgentUbuntuJenkinsfile 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