forked from narasimhavuppala/jenkins-calculator
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathJenkinsfile
70 lines (68 loc) · 1.67 KB
/
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
pipeline {
agent any
stages {
stage('checkout') {
steps {
checkout([$class: 'GitSCM', branches: [[name: '*/master']], doGenerateSubmoduleConfigurations: false, extensions: [], submoduleCfg: [], userRemoteConfigs: [[url: 'https://github.com/narasimhavuppala/jenkins-calculator.git']]])
echo 'checkout stage'
}
}
stage('Build') {
steps {
bat 'mvn -T 3 clean install'
echo 'Build stage'
}
}
stage('Aprove') {
input {
message 'Should we continue?'
id 'Yes, we should.'
submitter 'Anitha s,bob'
parameters {
string(name: 'PERSON', defaultValue: 'Mr Jenkins', description: 'Who should I say hello to?')
}
}
steps {
echo "Hello, ${PERSON}, nice to meet you."
}
}
stage('publish Junit') {
steps {
cobertura(coberturaReportFile: 'target/site/cobertura/coverage.xml', conditionalCoverageTargets: '70, 0, 0', lineCoverageTargets: '80, 0, 0', methodCoverageTargets: '80, 0, 0', sourceEncoding: 'ASCII')
echo 'Unit stage'
}
}
stage('parallel') {
parallel {
stage('coverage') {
steps {
echo 'coverage stage'
}
}
stage('pmd') {
steps {
echo 'pmd stage'
}
}
}
}
}
tools {
maven 'Maven3'
}
post {
always {
echo 'reached post section'
}
}
options {
timeout(time: 1, unit: 'HOURS')
}
parameters {
string(name: 'PERSON', description: 'Who should I say hello to?')
booleanParam(name: 'DEBUG_BUILD', description: '')
}
triggers {
cron('H */4 * * 1-5')
}
}