diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..f58f527 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,13 @@ + +FROM maven:3.9.6-eclipse-temurin-17 + +WORKDIR /build + +COPY . . + +RUN mvn package -DskipTest && mv target/sysfoo*.jar /run/sysfoo.jar + +EXPOSE 8080 + +CMD [ "java","-jar","/run/sysfoo.jar" ] + diff --git a/Jenkinsfile b/Jenkinsfile new file mode 100644 index 0000000..6b1672f --- /dev/null +++ b/Jenkinsfile @@ -0,0 +1,37 @@ +pipeline { + agent none + stages { + stage('one') { + steps { + echo 'compiling the app....' + sh 'mvn compile' + } + } + + stage('two') { + steps { + echo 'testing the app....' + sh 'mvn clean test' + } + } + + stage('three') { + steps { + echo 'packaging the app....' + sh 'mvn package -DskipTests' + sh 'mvn -v' + archiveArtifacts '**/target/*.jar' + } + } + + } + tools { + maven 'Maven 3.9.11' + } + post { + always { + echo 'This pipeline is completed..' + } + + } +} \ No newline at end of file