diff --git a/JenkinsFile b/JenkinsFile new file mode 100644 index 00000000..ba9c1091 --- /dev/null +++ b/JenkinsFile @@ -0,0 +1,34 @@ +pipeline { + agent any + + tools{ + maven 'Maven 3.6.3' + } + + stages{ + stage("build"){ + steps{ + echo 'compile sysfoo app' + sh 'mvn compile' + } + } + stage("test"){ + steps{ + echo 'running unit tests' + sh 'mvn clean test' + } + } + stage("package"){ + steps{ + echo 'packaging app to generate artifacts' + sh 'mvn package -DskipTests' + } + } + } + + post{ + always{ + echo 'This pipeline is completed..' + } + } +} diff --git a/Jenkinsfile b/Jenkinsfile new file mode 100644 index 00000000..89fd1b12 --- /dev/null +++ b/Jenkinsfile @@ -0,0 +1,42 @@ +pipeline { + agent { + docker { + image 'maven:3.6.3-jdk-11-slim' + } + + } + stages { + stage('build') { + steps { + echo 'compile sysfoo app' + sh 'mvn compile' + } + } + + stage('test') { + steps { + echo 'running unit tests' + sh 'mvn clean test' + } + } + + stage('package') { + steps { + echo 'packaging app to generate artifacts' + sh 'mvn package -DskipTests' + archiveArtifacts 'target/*.war' + archiveArtifacts 'target/*.war' + } + } + + } + tools { + maven 'Maven 3.6.3' + } + post { + always { + echo 'This pipeline is completed..' + } + + } +} \ No newline at end of file