forked from CIDCO-dev/SBET-decoder
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathJenkinsfile
More file actions
77 lines (67 loc) · 1.86 KB
/
Copy pathJenkinsfile
File metadata and controls
77 lines (67 loc) · 1.86 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
pipeline {
environment {
major=0
minor=1
patch="${env.BUILD_ID}"
name="${env.JOB_NAME}"
version="$major.$minor.$patch"
exec_name="sbet-decoder-$version"
publishDir="/var/www/html/$name/$version"
lastPublishDir="/var/www/html/$name/last"
binMasterPublishDir="$publishDir/bin/debian9/bin"
binWinx64Dir="bin/windows-x64/bin"
binWinx64PublishDir="$publishDir/$binWinx64Dir"
}
agent none
stages {
stage('TEST MASTER'){
agent { label 'master'}
steps {
sh "make test"
}
post {
always {
junit 'build/test/reports/*.xml'
}
}
}
stage('DOCUMENTATION'){
agent { label 'master'}
steps {
sh "make doc"
}
}
stage('BUILD WINDOWS AND TEST'){
agent {label 'windows10-x64-2'}
steps {
bat "Scripts\\change_makefile_name.bat"
//compile
bat "make test"
archiveArtifacts('build\\bin\\sbet-decoder.exe')
archiveArtifacts('build\\bin\\accuracy-decoder.exe')
}
post {
always {
junit 'build\\test\\reports\\*.xml'
}
}
}
stage('BUILD MASTER'){
agent { label 'master'}
steps {
sh 'make'
sh 'mkdir -p $binMasterPublishDir'
sh 'cp -r build/bin/sbet-decoder $binMasterPublishDir/$exec_name'
sh 'cp -r build/bin/accuracy-decoder $binMasterPublishDir/accuracy-decoder-$version'
}
}
stage('SAVE WINDOWS EXE on SERVER'){
agent { label 'master' }
steps {
sh 'mkdir -p $binWinx64PublishDir'
sh 'cp /var/lib/jenkins/jobs/$name/builds/$patch/archive/build/bin/sbet-decoder.exe $binWinx64PublishDir/$exec_name.exe '
sh 'cp /var/lib/jenkins/jobs/$name/builds/$patch/archive/build/bin/accuracy-decoder.exe $binWinx64PublishDir/accuracy-decoder-$version.exe '
}
}
}
}