Skip to content

Raz sol #9

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 20 commits into
base: master
Choose a base branch
from
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
51 changes: 51 additions & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
pipeline {
agent {
node {
label 'centos7-nodejs'
}

}
stages {
stage('CheckOutCode') {
steps {
cleanWs()
git(url: 'https://github.com/razorbach1/spring-boot-examples.git', branch: 'raz_sol', changelog: true)
}
}

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

stage('Test mvn') {
steps {
sh '''cd spring-boot-package-war
mvn test'''
}
}

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

stage('packege') {
steps {
sh '''cd spring-boot-package-war
mvn clean package'''
}
}

stage('Slack') {
steps {
slackSend(channel: 'int-project', message: 'Success! Raz', token: 'Z9sGHTKC0iGOYzeIdmOSZwZB')
}
}

}
}
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";
}
}
}