forked from JamesMc86/VITAC-GLA-Demo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathJenkinsfile
63 lines (57 loc) · 1.53 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
pipeline {
agent {
node {
label 'LV2015'
}
}
environment {
LV_VER = 2015
LV_BIT = 32
G_CLI_PARAMS = "--lv-ver ${env.LV_VER}"
VERSION = "1.3.1"
FULL_VERSION = VersionNumber(versionNumberString: '${BUILDS_ALL_TIME,X}', versionPrefix: "${VERSION}." , worstResultForIncrement: 'FAILURE')
}
options {
timeout(time:45, unit: 'MINUTES')
buildDiscarder(logRotator(numToKeepStr: '100'))
}
stages {
stage('Setup') {
steps {
script {
currentBuild.displayName = "${env.FULL_VERSION}"
}
echo "Building ${FULL_VERSION}"
bat "if not exist builds mkdir builds"
bat 'g-cli %G_CLI_PARAMS% vipcApply -- "VITAC (VI Tester Advanced Comparisons).vipc" %LV_VER% %LV_BIT%'
}
}
stage('Unit Test') {
steps {
bat 'g-cli %G_CLI_PARAMS% viTester -- -xml "test_results.xml" "VITAC.lvproj"'
junit 'test_results.xml'
}
}
stage('Build Outputs') {
steps {
bat 'g-cli %G_CLI_PARAMS% vipBuild -- -versionNumber %FULL_VERSION% "VITAC (VI Tester Advanced Comparisons).vipb"'
archiveArtifacts artifacts: '*.vip', fingerprint: true
}
}
stage('Release Steps') {
when { buildingTag() }
steps {
script {
currentBuild.description = "${env.VERSION} Release"
currentBuild.keepLog = true
}
}
}
}
post {
always {
step([$class: 'Mailer', notifyEveryUnstableBuild: true, recipients: emailextrecipients([culprits(), requestor(), upstreamDevelopers()]), sendToIndividuals: true])
bat 'g-cli %G_CLI_PARAMS% quitLabVIEW'
}
}
}