-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathJenkinsfile
More file actions
42 lines (36 loc) · 916 Bytes
/
Jenkinsfile
File metadata and controls
42 lines (36 loc) · 916 Bytes
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
pipeline {
agent {
label 'QA'
}
tools {
jdk 'jdk17'
maven 'maven3'
}
stages {
stage("Cleanup Workspace") {
steps {
cleanWs()
}
}
stage("Checkout from SCM") {
steps {
git branch: 'main', credentialsId: 'Git-Github-token', url: 'https://github.com/Devnikops/Jenkins-case-study.git'
}
}
stage('Build') {
steps {
sh 'mvn clean install'
// sh 'ant build' -- build using Ant
}
}
}
post {
failure {
emailext(
to: 'devopswithnik@gmail.com',
subject: "Build Failed: ${currentBuild.fullDisplayName}",
body: "This build has failed."
)
}
}
}