diff --git a/Jenkinsfile b/Jenkinsfile new file mode 100644 index 000000000..a89ceb252 --- /dev/null +++ b/Jenkinsfile @@ -0,0 +1,72 @@ +pipeline { + agent { + docker{ + image 'maven:alpine' + args '--network=ci_attachable' + } + } + options { + gitLabConnection('gitlab') + buildDiscarder(logRotator(numToKeepStr: '5')) + timestamps() + } + triggers { + gitlab(triggerOnPush: true, triggerOnMergeRequest: true, branchFilterType: 'All') + pollSCM '@hourly' + } + stages { + stage("build") { + steps { + sh 'mvn -Dmaven.test.failure.ignore=true --settings /maven/settings-docker.xml clean package' + } + } + stage('Quality Gates') { + steps { + sh 'mvn --settings /maven/settings-docker.xml sonar:sonar' + } + } + stage('Deploy - Dev') { + steps { + sh 'echo deploying to dev...' + } + } + stage('Selenium Test') { + steps { + parallel ( + "Firefox" : { + sh "echo testing FFX" + sh "echo more steps" + }, + "Chrome" : { + sh "echo testing Chrome" + sh "echo more steps" + } + ) + } + } + stage('Deploy - Staging') { + steps { + sh 'echo deploying to staging...' + sh 'echo smoke tests...' + } + } + stage('Deploy - Production') { + steps { + sh 'echo deploying to production...' + } + } + } + post { + failure { + updateGitlabCommitStatus name: 'build', state: 'failed' + } + success { + updateGitlabCommitStatus name: 'build', state: 'success' + } + always { + archive "target/**/*" + junit(allowEmptyResults: true, testResults: 'target/surefire-reports/*.xml') + archiveArtifacts(artifacts: 'target/*.jar', fingerprint: true, onlyIfSuccessful: true, defaultExcludes: true) + } + } +} diff --git a/pom.xml b/pom.xml index f64e6d122..dfd67eaac 100644 --- a/pom.xml +++ b/pom.xml @@ -6,34 +6,24 @@ org.springframework.samples spring-petclinic 1.5.1 - org.springframework.boot spring-boot-starter-parent 1.5.4.RELEASE petclinic - - - 1.8 UTF-8 UTF-8 - - 3.3.6 1.11.4 2.2.4 1.8.0 3.0.6.RELEASE - 2.7 - - - org.springframework.boot spring-boot-starter-actuator @@ -65,8 +55,6 @@ spring-boot-starter-test test - - org.hsqldb hsqldb @@ -77,8 +65,6 @@ mysql-connector-java runtime - - javax.cache cache-api @@ -87,8 +73,6 @@ org.ehcache ehcache - - org.webjars webjars-locator @@ -108,15 +92,12 @@ bootstrap ${webjars-bootstrap.version} - - org.springframework.boot spring-boot-devtools runtime - @@ -124,8 +105,6 @@ spring-boot-maven-plugin - build-info @@ -156,9 +135,6 @@ - - pl.project13.maven git-commit-id-plugin @@ -178,7 +154,6 @@ false - ro.isdc.wro4j wro4j-maven-plugin @@ -210,7 +185,6 @@ - org.codehaus.mojo cobertura-maven-plugin @@ -224,5 +198,4 @@ - diff --git a/readme.md b/readme.md index ac30d6392..c308764c8 100644 --- a/readme.md +++ b/readme.md @@ -10,6 +10,8 @@ ./mvnw spring-boot:run ``` + + You can then access petclinic here: http://localhost:8080/ petclinic-screenshot @@ -99,7 +101,3 @@ Here is a list of them: The [issue tracker](https://github.com/spring-projects/spring-petclinic/issues) is the preferred channel for bug reports, features requests and submitting pull requests. For pull requests, editor preferences are available in the [editor config](.editorconfig) for easy use in common text editors. Read more and download plugins at . - - - -