forked from demo1orgtoday/MavenBuild-SL
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathJenkinsfile
More file actions
48 lines (37 loc) · 1.12 KB
/
Jenkinsfile
File metadata and controls
48 lines (37 loc) · 1.12 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
44
45
46
47
48
pipeline{
tools{
maven 'mymaven'
}
// where to run the pipeline
// agent means a server/virtual machine
// any here means--current windows server
agent any
// In pipline we want to exeucte many jobs -> called stages
// pipeline = set of stages/set of task
stages{
// each task/job represents a stage
stage('Clone the repo'){
steps{
git 'https://github.com/Sonal0409/MavenBuild-SL.git'
}
}
stage('Compile the code'){
steps{
bat 'mvn test'
//bat : you are running the command using windows command line(batch)
}
}
stage('Execute the tests'){
steps{
bat 'mvn test'
//bat : you are running the command using windows command line(batch)
}
}
stage('Execute the package'){
steps{
bat 'mvn package'
//bat : you are running the command using windows command line(batch)
}
}
}
}