diff --git a/Jenkinsfile b/Jenkinsfile new file mode 100644 index 00000000..985392f5 --- /dev/null +++ b/Jenkinsfile @@ -0,0 +1,35 @@ +pipeline { + agent { + docker { + image 'maven:3.6.3-jdk-11-slim' + } + + } + stages { + stage('build') { + steps { + echo 'compile maven app' + sh 'mvn compile' + } + } + + stage('test') { + steps { + echo 'test maven app' + sh 'mvn clean test' + } + } + + stage('package') { + steps { + echo 'package maven app' + sh 'mvn package -DskipTests' + archiveArtifacts 'target/*.war' + } + } + + } + tools { + maven 'Maven 3.6.3' + } +} \ No newline at end of file diff --git a/README.md b/README.md index 38a78cde..b84a8490 100644 --- a/README.md +++ b/README.md @@ -1 +1,3 @@ This is a Sample Maven App. + +Test