-
Notifications
You must be signed in to change notification settings - Fork 11
/
Jenkinsfile
51 lines (40 loc) · 1.43 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
//@Library('tfc-lib') _
library(identifier: 'jenkinssharedlib@MATLAB-bootfiles', retriever: modernSCM(
[$class: 'GitSCMSource',
remote: 'https://github.com/ribhudp23/jenkinssharedlib-private-fork.git',
credentialsId: 'GH-SharedLib-Private-Fork-Access'
]))
https://github.com/ribhudp23/jenkinssharedlib-private-fork.git
dockerConfig = getDockerConfig(['MATLAB','Vivado'], matlabHSPro=false)
dockerConfig.add("-e MLRELEASE=R2021b")
dockerHost = 'docker'
////////////////////////////
hdlBranches = ['main']
stage("Build Toolbox") {
dockerParallelBuild(hdlBranches, dockerHost, dockerConfig) {
branchName ->
withEnv(['HDLBRANCH='+branchName]) {
checkout scm
sh 'git submodule update --init'
sh 'pip3 install -r requirements_doc.txt'
sh 'make -C ./CI/gen_doc doc'
sh 'make -C ./CI/scripts gen_tlbx'
}
stash includes: '**', name: 'builtSources', useDefaultExcludes: false
archiveArtifacts artifacts: '*.mltbx', followSymlinks: false, allowEmptyArchive: true
}
}
/////////////////////////////////////////////////////
//////////////////////////////////////////////////////
node {
stage('Deploy Development') {
unstash "builtSources"
uploadArtifactory('PrecisionToolbox','*.mltbx')
}
if (env.BRANCH_NAME == 'main') {
stage('Deploy Production') {
unstash "builtSources"
uploadFTP('PrecisionToolbox','*.mltbx')
}
}
}