Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 56 additions & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
pipeline {
agent {
node {
label 'CentOS7'
}

}
stages {
stage('checkout code') {
steps {
git(branch: 'danny_sol', url: 'https://github.com/danny-ros/spring-boot-examples.git')
}
}

stage('Build') {
steps {
sh '''cd spring-boot-package-war
mvn compile'''
}
}

stage('Test') {
post {
always {
junit '**/surefire-reports/**/*.xml'
}

}
steps {
sh '''cd spring-boot-package-war
mvn test'''
}
}

stage('Deploy to Integration ') {
steps {
sh '''cd spring-boot-package-war
mvn build-helper:parse-version versions:set -DnewVersion=0.0.2.$BUILD_ID-SNAPSHOT versions:commit
mvn package'''
}
}

stage('Artifacts') {
steps {
archiveArtifacts 'spring-boot-package-war/target/*.war'
}
}

stage('slack') {
steps {
slackSend(channel: 'danny-dev', color: '#439FE0', message: 'new mvn build', tokenCredentialId: 'Slack')
}
}

}
}
2 changes: 0 additions & 2 deletions README.md

This file was deleted.

30 changes: 0 additions & 30 deletions README_EN.md

This file was deleted.

5 changes: 5 additions & 0 deletions spring-boot-package-war/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,11 @@
<artifactId>spring-boot-devtools</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
<version>2.3.0</version>
</dependency>
</dependencies>

<build>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ public class HelloWorldController {

@RequestMapping("/hello")
public String index() {
return "Hello World xx";
return "Hello World";
}
}
}