GeezerVison is showing github.com — Dockerfile & Jenkinsfile · Areefgithub/samplejavaapp@977825b
File treeExpand file treeCollapse file tree Open diff view settings Expand file treeCollapse file tree Open diff view settings Collapse file Copy file name to clipboard +4Lines changed: 4 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
| | 1 | +FROM tomcat | | 2 | +ADD addressbook.war /usr/local/tomcat/webapps | | 3 | +EXPOSE 8080 | | 4 | +CMD /usr/local/tomcat/bin/catalina.sh run |
Collapse file Copy file name to clipboard +51Lines changed: 51 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
| | 1 | +pipeline { | | 2 | + agent any | | 3 | + stages { | | 4 | + stage('compile') { | | 5 | + steps { | | 6 | + echo 'compiling..' | | 7 | + git url: 'https://github.com/lerndevops/DevOpsClassCodes' | | 8 | + sh label: '', script: 'mvn compile' | | 9 | + } | | 10 | + } | | 11 | + stage('codereview-pmd') { | | 12 | + steps { | | 13 | + echo 'codereview..' | | 14 | + sh label: '', script: 'mvn -P metrics pmd:pmd' | | 15 | + } | | 16 | + post { | | 17 | + success { | | 18 | + pmd canComputeNew: false, defaultEncoding: '', healthy: '', pattern: '**/pmd.xml', unHealthy: '' | | 19 | + } | | 20 | + } | | 21 | + } | | 22 | + stage('unit-test') { | | 23 | + steps { | | 24 | + echo 'codereview..' | | 25 | + sh label: '', script: 'mvn test' | | 26 | + } | | 27 | + post { | | 28 | + success { | | 29 | + junit 'target/surefire-reports/*.xml' | | 30 | + } | | 31 | + } | | 32 | + } | | 33 | + stage('metric-check') { | | 34 | + steps { | | 35 | + echo 'unit test..' | | 36 | + sh label: '', script: 'mvn cobertura:cobertura -Dcobertura.report.format=xml' | | 37 | + } | | 38 | + post { | | 39 | + success { | | 40 | + cobertura autoUpdateHealth: false, autoUpdateStability: false, coberturaReportFile: 'target/site/cobertura/coverage.xml', conditionalCoverageTargets: '70, 0, 0', failUnhealthy: false, failUnstable: false, lineCoverageTargets: '80, 0, 0', maxNumberOfBuilds: 0, methodCoverageTargets: '80, 0, 0', onlyStable: false, sourceEncoding: 'ASCII', zoomCoverageChart: false | | 41 | + } | | 42 | + } | | 43 | + } | | 44 | + stage('package') { | | 45 | + steps { | | 46 | + echo 'metric-check..' | | 47 | + sh label: '', script: 'mvn package' | | 48 | + } | | 49 | + } | | 50 | + } | | 51 | +} |
Collapse file Copy file name to clipboard +51Lines changed: 51 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
| | 1 | +pipeline { | | 2 | + agent any | | 3 | + stages { | | 4 | + stage('compile') { | | 5 | + steps { | | 6 | + echo 'compiling..' | | 7 | + git url: 'https://github.com/lerndevops/DevOpsClassCodes' | | 8 | + bat label: '', script: 'mvn compile' | | 9 | + } | | 10 | + } | | 11 | + stage('codereview-pmd') { | | 12 | + steps { | | 13 | + echo 'codereview..' | | 14 | + bat label: '', script: 'mvn -P metrics pmd:pmd' | | 15 | + } | | 16 | + post { | | 17 | + success { | | 18 | + pmd canComputeNew: false, defaultEncoding: '', healthy: '', pattern: '**/pmd.xml', unHealthy: '' | | 19 | + } | | 20 | + } | | 21 | + } | | 22 | + stage('unit-test') { | | 23 | + steps { | | 24 | + echo 'codereview..' | | 25 | + bat label: '', script: 'mvn test' | | 26 | + } | | 27 | + post { | | 28 | + success { | | 29 | + junit 'target/surefire-reports/*.xml' | | 30 | + } | | 31 | + } | | 32 | + } | | 33 | + stage('metric-check') { | | 34 | + steps { | | 35 | + echo 'unit test..' | | 36 | + bat label: '', script: 'mvn cobertura:cobertura -Dcobertura.report.format=xml' | | 37 | + } | | 38 | + post { | | 39 | + success { | | 40 | + cobertura autoUpdateHealth: false, autoUpdateStability: false, coberturaReportFile: 'target/site/cobertura/coverage.xml', conditionalCoverageTargets: '70, 0, 0', failUnhealthy: false, failUnstable: false, lineCoverageTargets: '80, 0, 0', maxNumberOfBuilds: 0, methodCoverageTargets: '80, 0, 0', onlyStable: false, sourceEncoding: 'ASCII', zoomCoverageChart: false | | 41 | + } | | 42 | + } | | 43 | + } | | 44 | + stage('package') { | | 45 | + steps { | | 46 | + echo 'metric-check..' | | 47 | + bat label: '', script: 'mvn package' | | 48 | + } | | 49 | + } | | 50 | + } | | 51 | +} |
Collapse file Copy file name to clipboardExpand all lines: laskd -1Lines changed: 0 additions & 1 deletion
|