-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathJenkinsfile
64 lines (56 loc) · 1.37 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
#!groovy
pipeline {
// agent defines where the pipeline will run.
agent {
label {
label("ndhspare53")
}
}
environment {
NODE = "${env.NODE_NAME}"
ELOCK = "epics_${NODE}"
}
// The options directive is for configuration that applies to the whole job.
options {
buildDiscarder(logRotator(numToKeepStr:'5', daysToKeepStr: '7'))
disableConcurrentBuilds()
// as we "checkout scm" as a stage, we do not need to do it here too
skipDefaultCheckout(true)
timestamps()
}
stages {
stage("Checkout") {
steps {
timeout(time: 2, unit: 'HOURS') {
checkout scm
}
}
}
stage("Build") {
steps {
echo "Building"
lock(resource: ELOCK, inversePrecedence: false) {
timeout(time: 16, unit: 'HOURS') {
echo "Branch: ${env.BRANCH_NAME}"
echo "Build Number: ${env.BUILD_NUMBER}"
bat """
jenkins_build.bat
"""
}
}
}
}
}
post {
always {
archiveArtifacts artifacts: '**/config.log', caseSensitive: false
logParser ([
projectRulePath: 'parse_rules',
parsingRulesPath: '',
showGraphs: true,
unstableOnWarning: false,
useProjectRule: true,
])
}
}
}