1 | // This loads the Jenkins pipeline library found in the ci folder. |
---|
2 | def url = scm.getLocations()[0].remote |
---|
3 | def base_url = url - "external/build_externals/Jenkins" |
---|
4 | echo base_url |
---|
5 | library identifier: 'build_externals@ci', retriever: modernSCM([$class: 'SubversionSCMSource', remoteBase: url, credentialsId: '']) |
---|
6 | library identifier: 'JModelica@ci', retriever: modernSCM([$class: 'SubversionSCMSource', remoteBase: base_url, credentialsId: '']) |
---|
7 | library identifier: 'build_thirdparties@ci', retriever: modernSCM([$class: 'SubversionSCMSource', remoteBase: "${base_url}/ThirdParty/build_thirdparties/Jenkins", credentialsId: '']) |
---|
8 | |
---|
9 | // Extract branch info from url variable (this assumes that this Jenkinsfile |
---|
10 | // has been checked out directly by Jenkins as part of pipeline build). |
---|
11 | (JM_SVN_PATH, JM_SVN_TYPE, JM_SVN_NAME) = extractBranchInfo("https://svn.jmodelica.org", base_url) |
---|
12 | |
---|
13 | // Set build name: |
---|
14 | currentBuild.displayName += " (" + (env.TRIGGER_CAUSE == null ? "MANUAL" : env.TRIGGER_CAUSE) + ")" |
---|
15 | |
---|
16 | // Set discard policy |
---|
17 | properties([buildDiscarder(logRotator(artifactDaysToKeepStr: '', artifactNumToKeepStr: '5', daysToKeepStr: '', numToKeepStr: ''))]) |
---|
18 | |
---|
19 | |
---|
20 | node ('docker') { |
---|
21 | checkoutJM("${JM_SVN_PATH}") |
---|
22 | buildAssimuloDocker("centos", "wheel", "jenkins_centos_config") |
---|
23 | buildAssimuloDocker("centos", "folder", "jenkins_centos_config") |
---|
24 | buildAssimuloDocker("ubuntu", "wheel", "jenkins_ubuntu_config") |
---|
25 | buildAssimuloDocker("ubuntu", "folder", "jenkins_ubuntu_config") |
---|
26 | } |
---|
27 | node("JMODELICA-SDK-1.13.2") { |
---|
28 | checkoutJM("${JM_SVN_PATH}") |
---|
29 | for (module in ["superlu", "blas", "lapack", "sundials"]) { |
---|
30 | buildThirdPartyFromMake(null, null, "${pwd()}/build", module) |
---|
31 | } |
---|
32 | buildAssimulo(null, null, "${pwd()}/build", "folder") |
---|
33 | buildAssimulo(null, null, "${pwd()}/build", "wheel") |
---|
34 | } |
---|
35 | |
---|
36 | |
---|