-
Notifications
You must be signed in to change notification settings - Fork 1
/
PAAS
49 lines (48 loc) · 1002 Bytes
/
PAAS
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
def COLOR_MAP= [
'SUCCESS': 'good',
'FAILURE': 'danger'
]
pipeline{
agent any
tools{
maven "maven"
jdk "openjdk8"
}
stages{
stage('Fetch the code'){
steps{
git branch: 'master' , url: 'https://github.com/Teja-Chittamuri/HelloWolrd-DevopsE2E.git'
}
}
stage('Build code')
{
steps{
sh 'mvn clean install -Dskiptests'
}
}
stage('Test')
{
steps{
sh 'mvn test'
}
}
stage(' CHECKSTYLE code analysis'){
steps{
sh 'mvn checkstyle:checkstyle'
}
post{
success{
echo 'Generating est reports'
}
}
}
}
post{
always{
echo 'Slack Notifications.'
slackSend channel: '#jenkinsci_job',
color: COLOR_MAP[currentBuild.currentResult],
message: "*${currentBuild.currentResult}:* Job ${env.JOB_NAME} build ${env.BUILD_NUMBER} \n More info at: ${env.BUILD_URL}"
}
}
}