-
Notifications
You must be signed in to change notification settings - Fork 54
/
Copy pathJenkinsfile
53 lines (43 loc) · 930 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
47
48
49
50
51
jsl = library(
identifier: "jenkins-shared-library@${env.BRANCH_NAME}",
retriever: modernSCM(
[
$class: 'GitSCMSource',
remote: 'https://github.com/hoto/jenkins-shared-library.git'
]
)
)
build = jsl.com.mycompany.jenkins.Build.new(this)
git = jsl.com.mycompany.jenkins.Git.new(this)
pipeline {
agent {
docker {
image 'docker.io/gradle:4.5.1-jdk8'
args '-v /root/.gradle:/home/gradle/.gradle'
}
}
options {
timeout(time: 5, unit: 'MINUTES')
}
stages {
stage('Init') {
steps {
script {
COMMIT_MESSAGE = git.commitMessage()
COMMIT_AUTHOR = git.commitAuthor()
build.setBuildDescription(
message: COMMIT_MESSAGE,
description: COMMIT_AUTHOR
)
}
}
}
stage('Unit Tests') {
steps {
script {
sh './gradlew test'
}
}
}
}
}