diff --git a/JenkinsFile1 b/JenkinsFile1 new file mode 100644 index 000000000..dc31fb558 --- /dev/null +++ b/JenkinsFile1 @@ -0,0 +1,49 @@ +new commit pipeline{ + new chnage for commit tools{ + jdk 'myjava' + maven 'mymaven131' + } + //more commits on the file + //commit on github-- new one + agent any + new ctsage added + stages{ + stage('Checkout on git'){ + agent any + steps{ + git 'https://github.com/devops-trainer/DevOpsClassCodes.git' + } + } + stage('Compile'){ + agent any + steps{ + sh 'mvn compile' + } + } + stage('CodeReview'){ + agent any + steps{ + sh 'mvn pmd:pmd' + } + } + stage('UnitTest'){ + agent {label 'win_slave'} + steps{ + git 'https://github.com/devops-trainer/DevOpsClassCodes.git' + bat 'mvn test' + } + } + stage('MetricCheck'){ + agent any + steps{ + sh 'mvn cobertura:cobertura -Dcobertura.report.format=xml' + } + } + stage('Package'){ + agent{label 'win_slave'} + steps{ + bat 'mvn package' + } + } + } +} diff --git a/Jenkinsfile b/Jenkinsfile new file mode 100644 index 000000000..5ebf9def9 --- /dev/null +++ b/Jenkinsfile @@ -0,0 +1,60 @@ + +pipeline{ + tools{ + jdk 'myjava' + maven 'mymaven' + } + agent any + stages{ + stage('Checkout'){ + + steps{ + echo 'cloning..' + git 'https://github.com/Sonal0409/DevOpsClassCodes.git' + } + } + stage('Compile'){ + + steps{ + echo 'compiling..' + sh 'mvn compile' + } + } + stage('CodeReview'){ + + steps{ + + echo 'codeReview' + sh 'mvn pmd:pmd' + } + } + stage('UnitTest'){ + + steps{ + echo 'Testing' + sh 'mvn test' + } + post { + success { + junit 'target/surefire-reports/*.xml' + } + } + } + stage('MetricCheck'){ + + steps{ + sh 'mvn cobertura:cobertura -Dcobertura.report.format=xml' + } + + } + stage('Package'){ + + steps{ + + sh 'mvn package' + } + } + + + } +} diff --git a/README.md b/README.md index fefd2a53b..232fe2a18 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,9 @@ -Addressbook Tutorial +##Addressbook Tutoriall ==================== This tutorial teaches you some of the basic concepts in [Vaadin Framework](https://vaadin.com). It is meant to be a fast read for learning how to get started - not an example on how application should be -designed. Please note this example uses and requires Java 8 to work. +designed. Please note this example uses and requires Java 8 to work.. ![Addressbook Screenshot](addressbook_screenshot.png "Addressbook Screenshot") @@ -63,6 +63,6 @@ You should now have a Jetty server running on localhost:8080. Navigate to [http: To use the built in server adapters of Eclipse, instead of doing "Run As -> Maven Build..." you can do - Run As -> Run on Server - Select the server you want to run on, e.g. Apache Tomcat 8 and click ok -- *Do not use the suggested J2EE Preview server* as it is outdated, deprecated and does not support Servlet 3, which is required for this application +- *Do not use the suggested J2EE Preview server* as it is outdated, deprecated and does not support Servlet 3, which is required for this applications -*** End of documentation \ No newline at end of file +*** End of documentation diff --git a/pom.xml b/pom.xml index f2b7c1429..35cf03091 100644 --- a/pom.xml +++ b/pom.xml @@ -13,7 +13,14 @@ false 8.0.0.alpha2 ${vaadin.version} - + + 0.8.6 + jacoco + reuseReports + ${project.basedir}/../target/jacoco.exec + java + + @@ -153,7 +160,11 @@ xml-security-impl 1.0 - + + org.jacoco + jacoco-maven-plugin + 0.8.6 + @@ -301,11 +312,27 @@ maven-project-info-reports-plugin 2.7 - - org.jacoco - jacoco-maven-plugin - 0.7.2.201409121644 - + + + org.jacoco + jacoco-maven-plugin + ${jacoco.version} + + + jacoco-initialize + + prepare-agent + + + + jacoco-site + package + + report + + + + org.apache.maven.plugins maven-checkstyle-plugin