forked from Vinge1718/java-todo
-
Notifications
You must be signed in to change notification settings - Fork 235
/
Jenkinsfile
46 lines (41 loc) · 1006 Bytes
/
Jenkinsfile
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
pipeline {
agent any
tools {
gradle 'Gradle-6'
}
environment {
VERSION_NUMBER = '1.0'
}
stages {
stage('Clone repository') {
steps {
echo 'Cloning repository'
git 'https://github.com/brianmarete/java-todo.git'
}
}
stage('Build ') {
steps {
echo "Build number ${BUILD_NUMBER}"
// withGradle() {
sh 'gradle build'
// }
}
}
stage('Test') {
steps {
echo 'Testing the project'
// withGradle() {
sh 'gradle test'
// }
}
}
}
post {
success {
slackSend color: "good", message: "Build #${BUILD_NUMBER} ran successfully"
}
failure {
slackSend color: "danger", message: "Build #${BUILD_NUMBER} failed"
}
}
}