2016-10-25 18:10:21 +00:00
|
|
|
#!/usr/bin/env groovy
|
2016-10-25 21:58:27 +00:00
|
|
|
|
2020-01-23 17:41:17 +00:00
|
|
|
def alpineStaticTask(distro, platform) {
|
|
|
|
def myNode = {
|
|
|
|
node ('linux-build') {
|
2016-10-25 21:35:31 +00:00
|
|
|
checkout scm
|
2020-01-23 17:41:17 +00:00
|
|
|
def runtime = docker.image("ztbuild/${distro}-${platform}:latest")
|
|
|
|
runtime.inside {
|
|
|
|
sh 'make -j8 ZT_STATIC=1 all'
|
|
|
|
sh "mv zerotier-one zerotier-one-static-${platform}"
|
|
|
|
archiveArtifacts artifacts: 'zerotier-one-*', fingerprint: true, onlyIfSuccessful: true
|
2016-10-25 21:35:31 +00:00
|
|
|
}
|
|
|
|
}
|
2016-10-25 18:10:21 +00:00
|
|
|
}
|
2020-01-23 17:41:17 +00:00
|
|
|
return myNode
|
|
|
|
}
|
2016-10-25 19:40:03 +00:00
|
|
|
|
2020-01-23 17:41:17 +00:00
|
|
|
def getTasks(axisDistro, axisPlatform, task) {
|
|
|
|
def tasks = [:]
|
|
|
|
for(int i=0; i< axisDistro.size(); i++) {
|
|
|
|
def axisDistroValue = axisDistro[i]
|
|
|
|
for(int j=0; j< axisPlatform.size(); j++) {
|
|
|
|
def axisPlatformValue = axisPlatform[j]
|
|
|
|
tasks["${axisDistroValue}/${axisPlatformValue}"] = task(axisDistroValue, axisPlatformValue)
|
2019-11-21 22:51:33 +00:00
|
|
|
}
|
2020-01-23 17:41:17 +00:00
|
|
|
}
|
|
|
|
return tasks
|
|
|
|
}
|
2016-10-25 19:58:54 +00:00
|
|
|
|
2020-01-23 17:41:17 +00:00
|
|
|
pipeline {
|
|
|
|
options {
|
|
|
|
disableConcurrentBuilds()
|
2019-11-21 22:51:33 +00:00
|
|
|
}
|
2020-01-23 17:41:17 +00:00
|
|
|
|
|
|
|
agent none
|
|
|
|
|
|
|
|
stages {
|
|
|
|
stage ("Static Build") {
|
|
|
|
steps {
|
|
|
|
script {
|
|
|
|
def dist = ["alpine"]
|
|
|
|
def archs = ["aarch64", "amd64", "i386", "armhf", "armel", "ppc64le", "s390x"]
|
|
|
|
parallel getTasks(dist, archs, this.&alpineStaticTask)
|
|
|
|
}
|
2019-11-22 19:25:31 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2016-10-25 18:10:21 +00:00
|
|
|
}
|
2016-10-25 21:35:31 +00:00
|
|
|
|
2020-01-23 17:41:17 +00:00
|
|
|
|
2017-06-30 20:43:39 +00:00
|
|
|
mattermostSend color: "#00ff00", message: "${env.JOB_NAME} #${env.BUILD_NUMBER} Complete (<${env.BUILD_URL}|Show More...>)"
|