-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathJenkinsfile
More file actions
43 lines (42 loc) · 1.26 KB
/
Jenkinsfile
File metadata and controls
43 lines (42 loc) · 1.26 KB
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
pipeline {
agent { docker { image 'maven:3.9.4-eclipse-temurin-17-alpine' } }
stages {
stage('Prepare Workspace') {
steps {
checkout scm: [
$class: 'GitSCM',
branches: scm.branches,
extensions: [
[$class: 'SubmoduleOption',
disableSubmodules: false,
parentCredentials: false,
recursiveSubmodules: true,
shallow: true,
trackingSubmodules: false]
],
submoduleCfg: [],
userRemoteConfigs: scm.userRemoteConfigs
]
}
}
stage('Build and run Tests') {
steps {
withMaven(maven : 'apache-maven-3.9.4') {
sh 'mvn clean verify'
}
}
}
}
post {
always {
junit testResults: '**/TEST-*.xml'
deleteDir() /* clean up our workspace */
}
success {
discordSend description: "${currentBuild.fullDisplayName}", footer: "", link: env.BUILD_URL, result: currentBuild.currentResult, title: "SUCCEEDED", webhookURL: "${DISCORD_WEBHOOKURL}"
}
failure {
discordSend description: "${currentBuild.rawBuild.getLog(10)}", footer: "${currentBuild.fullDisplayName}", link: env.BUILD_URL, result: currentBuild.currentResult, title: "FAILED", webhookURL: "${DISCORD_WEBHOOKURL}"
}
}
}