ZeroTierOne/Jenkinsfile

55 lines
1.5 KiB
Plaintext
Raw Normal View History

#!/usr/bin/env groovy
options {
disableConcurrentBuilds()
2016-10-25 15:01:59 -07:00
}
def alpineStaticTask(distro, platform) {
def myNode = {
node ('linux-build') {
2016-10-25 14:35:31 -07:00
checkout scm
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 14:35:31 -07:00
}
}
}
return myNode
}
2016-10-25 12:40:03 -07: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 14:51:33 -08:00
}
}
return tasks
}
pipeline {
options {
disableConcurrentBuilds()
2019-11-21 14:51:33 -08: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 11:25:31 -08:00
}
}
}
}
2016-10-25 14:35:31 -07:00
2017-06-30 13:43:39 -07:00
mattermostSend color: "#00ff00", message: "${env.JOB_NAME} #${env.BUILD_NUMBER} Complete (<${env.BUILD_URL}|Show More...>)"