-
Notifications
You must be signed in to change notification settings - Fork 2
/
Jenkinsfile
52 lines (42 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
@Library('tfc-lib') _
dockerConfig = getDockerConfig(['MATLAB','Vivado'], matlabHSPro=false)
dockerConfig.add("-e MLRELEASE=R2021b")
dockerHost = 'docker'
////////////////////////////
hdlBranches = ['master']
stage("Build Toolbox") {
dockerParallelBuild(hdlBranches, dockerHost, dockerConfig) {
branchName ->
withEnv(['HDLBRANCH='+branchName]) {
checkout scm
sh 'git submodule update --init'
sh 'make -C ./CI/scripts gen_tlbx'
}
stash includes: '**', name: 'builtSources', useDefaultExcludes: false
archiveArtifacts artifacts: '*.mltbx', followSymlinks: false, allowEmptyArchive: true
}
}
/////////////////////////////////////////////////////
classNames = ['IMU']
stage("Hardware Streaming Tests") {
dockerParallelBuild(classNames, dockerHost, dockerConfig) {
branchName ->
withEnv(['HW='+branchName]) {
unstash "builtSources"
sh 'make -C ./CI/scripts test_streaming'
}
}
}
//////////////////////////////////////////////////////
node {
stage('Deploy Development') {
unstash "builtSources"
uploadArtifactory('SensorToolbox','*.mltbx')
}
if (env.BRANCH_NAME == 'master') {
stage('Deploy Production') {
unstash "builtSources"
uploadFTP('SensorToolbox','*.mltbx')
}
}
}