-
Notifications
You must be signed in to change notification settings - Fork 22
Expand file tree
/
Copy pathJenkinsfile
More file actions
187 lines (162 loc) · 5.32 KB
/
Copy pathJenkinsfile
File metadata and controls
187 lines (162 loc) · 5.32 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
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
pipeline {
environment {
major=0
minor=1
patch="${env.BUILD_ID}"
name="${env.JOB_NAME}"
version="$major.$minor.$patch"
exec_name="OpenSidescan-$version"
publishDir="/var/www/html/$name/$version"
publishTestOutputWinx64Dir="$publishDir/TestOutputWinx64"
lastPublishDir="/var/www/html/$name/last"
binMasterPublishDir="$publishDir/Linux"
binWinx64Dir="windows-x64"
binWinx64PublishDir="$publishDir/$binWinx64Dir"
}
agent none
stages {
stage('Test file locking on linux'){
agent { label 'ubnt20-build-opensidescan-vm'}
steps {
sh 'Scripts/build_lock_test.sh'
sh 'mkdir -p build/reports'
sh 'test/linuxFileLockTest/build/lockTests -r junit -o build/reports/lock-test-report.xml || true'
sh 'sleep 20' //allow all processes forked in tests to stop
sh 'Scripts/cutReport.sh' //Cut the second set of test result from the forked process
junit 'build/reports/cut-report.xml'
}
}
stage('Test file locking on WINDOWS 10') {
agent { label 'windows10-build-opensidescan-vm'}
steps {
//compile winlocker
bat "Scripts/winlocktest.bat"
bat "echo %cd%"
bat "echo %cd%"
bat "test\\win-fileLock-test\\build\\Debug\\wincatchLockTest.exe -r junit -o build\\reports\\winlock-test-report.xml"
}
post {
always {
junit 'build\\reports\\winlock-test-report.xml'
}
}
}
stage('Unit tests on linux'){
agent { label 'ubnt20-build-opensidescan-vm'}
steps {
sh 'Scripts/build_linux_unit_tests.sh'
sh 'mkdir -p build/reports'
//sh 'test/build/tests -r junit -o build/reports/opensidescan-linux-test-report.xml || true'
sh 'test/build/tests'
//junit 'build/reports/opensidescan-linux-test-report.xml'
}
}
stage('Unit tests WINDOWS 10') {
agent { label 'windows10-build-opensidescan-vm'}
steps {
bat "Scripts/win-unittest.bat"
bat "test\\build\\tests.exe -r junit -o build\\reports\\win-unittest.xml"
//bat "test\\build\\tests.exe"
}
post {
always {
junit 'build\\reports\\win-unittest.xml'
}
}
}
stage('Build opensidescan linux'){
agent { label 'ubnt20-build-opensidescan-vm'}
steps {
sh 'Scripts/build_opensidescan.sh $version'
}
}
stage('BUILD OPENSIDESCAN FOR WINDOWS 10'){
agent { label 'windows10-build-opensidescan-vm'}
steps {
bat "Scripts/build_opensidescan_win.bat $version"
stash includes: 'build/Release/**' , name: 'executable'
}
}
stage('SIGN EXECUTABLE WINDOWS 10'){
agent{label 'windows10-Signatures'}
steps{
unstash 'executable'
bat "Scripts\\sign_exe.au3"
sleep time: 60, unit: 'SECONDS'
stash includes: 'build/Release/**' , name: 'executable'
}
}
stage('PACKAGE INSTALLER FOR WINDOWS 10'){
agent { label 'windows10-build-opensidescan-vm'}
steps {
unstash 'executable'
bat "Scripts/build_installer.bat $version"
stash includes: 'build/**' , name: 'installer'
}
}
stage('test Windows installer'){
agent { label 'windows10-build-opensidescan-vm'}
steps {
bat "Scripts\\test_installer.au3 $version"
bat "ScriptsPython\\check_installation.py"
}
}
stage('SIGN INSTALLER WINDOWS 10'){
agent{label 'windows10-Signatures'}
steps{
unstash 'installer'
bat "Scripts\\sign_installer.au3 $version"
sleep time: 60, unit: 'SECONDS'
archiveArtifacts('build/OpenSidescan-*-win64.exe')
}
}
/*
stage('PUBLISH ON SERVER'){
agent { label 'master'}
options {skipDefaultCheckout()}
steps {
sh 'mkdir -p $binWinx64PublishDir'
sh 'cp /var/lib/jenkins/jobs/$name/builds/$patch/archive/build/Opensidescan-*-win64.exe $binWinx64PublishDir/'
}
}
*/
/*
stage('Windows GUI tests'){
agent { label 'windows10-build-opensidescan-vm'}
steps {
bat "echo %cd%"
bat "ScriptsTestGUI/build_test_gui.bat"
bat "test\\testGUI\\build\\Release\\Opensidescan_gui_Tests.exe -o build\\reports\\win-testGUI.xml -xunitxml"
archiveArtifacts('build\\reports\\win-testGUI.xml')
}
post {
always {
junit 'build\\reports\\win-testGUI.xml'
}
}
}
*/ /*
stage('Linux GUI tests'){
agent { label 'ubnt20-build-opensidescan-vm'}
steps {
sh "ScriptsTestGUI/gui_test_linux.sh"
sh 'test/testGUI/build/Opensidescan_gui_Tests -o build/reports/linux-testGUI.xml -xunitxml'
junit 'build/reports/linux-testGUI.xml'
archiveArtifacts('build/reports/linux-testGUI.xml')
}
}
*/
/*
stage('PUBLISH WINDOWS TEST RESULTS ON SERVER'){
agent { label 'master'}
steps {
sh 'mkdir -p $publishTestOutputWinx64Dir'
//sh 'ls -al /var/lib/jenkins/jobs/$name/builds/$patch/'
//sh 'ls -al /var/lib/jenkins/jobs/$name/builds/$patch/archive/'
sh 'cp /var/lib/jenkins/jobs/$name/builds/$patch/archive/build/reports/win-testGUI.xml $publishTestOutputWinx64Dir'
//sh 'cp /var/lib/jenkins/jobs/$name/builds/$patch/archive/build/reports/linux-testGUI.xml $publishTestOutputWinx64Dir'
}
}
*/
}
}