-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathJenkinsfile
More file actions
111 lines (104 loc) · 3.98 KB
/
Jenkinsfile
File metadata and controls
111 lines (104 loc) · 3.98 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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
@Library("islog-helper") _
pipeline {
agent none
options {
gitLabConnection('Gitlab Pontos')
disableConcurrentBuilds()
lock label: 'CONAN_CONFIGURATION_LOCK', quantity: 1
}
environment {
PACKAGE_NAME = "LogicalAccessNFC/2.4.2@islog/${BRANCH_NAME}"
LINUX_DOCKER_IMAGE_NAME = 'artifacts.linq.hidglobal.com:5000/debian_build:latest'
// This is needed because MSBuild fails spuriously quiet often
// on the build machine.
MSBUILDDISABLENODEREUSE = 1
CONAN_REVISIONS_ENABLED = 1
}
parameters {
booleanParam(name: 'BUILD_DEBUG',
defaultValue: true,
description: 'Perform DEBUG build')
booleanParam(name: 'BUILD_RELEASE',
defaultValue: true,
description: 'Perform RELEASE build')
booleanParam(name: 'BUILD_WINDOWS',
defaultValue: true,
description: 'Perform Windows build')
booleanParam(name: 'BUILD_LINUX',
defaultValue: true,
description: 'Perform Linux build')
}
stages {
stage('Minimal Feature Build') {
steps {
script {
lst = []
if (params.BUILD_WINDOWS) {
if (params.BUILD_DEBUG) {
lst += 'lla/x64_msvc_debug_min'
lst += 'lla/x86_msvc_debug_min'
}
if (params.BUILD_RELEASE) {
lst += 'lla/x64_msvc_release_min'
lst += 'lla/x86_msvc_release_min'
}
}
if (params.BUILD_LINUX) {
if (params.BUILD_DEBUG) {
lst += 'lla/x64_gcc10_debug_min'
}
if (params.BUILD_RELEASE) {
lst += 'lla/x64_gcc10_release_min'
}
}
lla.startJobForProfiles(lst)
}
}
}
stage('Complete Feature Build') {
steps {
script {
lst = []
if (params.BUILD_WINDOWS) {
if (params.BUILD_DEBUG) {
lst += 'lla/x64_msvc_debug_full'
lst += 'lla/x86_msvc_debug_full'
}
if (params.BUILD_RELEASE) {
lst += 'lla/x64_msvc_release_full'
lst += 'lla/x86_msvc_release_full'
}
}
if (params.BUILD_LINUX) {
if (params.BUILD_DEBUG) {
lst += 'lla/x64_gcc10_debug_full'
}
if (params.BUILD_RELEASE) {
lst += 'lla/x64_gcc10_release_full'
}
}
lla.startJobForProfiles(lst)
}
}
}
}
post {
changed {
script {
if (currentBuild.currentResult == 'FAILURE' || currentBuild.currentResult == 'SUCCESS') {
// Other values: SUCCESS, UNSTABLE
// Send an email only if the build status has changed from green/unstable to red
emailext subject: '$DEFAULT_SUBJECT',
body: '$DEFAULT_CONTENT',
recipientProviders: [
[$class: 'CulpritsRecipientProvider'],
[$class: 'DevelopersRecipientProvider'],
[$class: 'RequesterRecipientProvider']
],
replyTo: 'cis@islog.com',
to: 'reports@islog.com'
}
}
}
}
}