ZeroTierOne/Jenkinsfile

52 lines
1.5 KiB
Plaintext
Raw Normal View History

#!/usr/bin/env groovy
def alpineStaticTask(distro, platform) {
def myNode = {
node ('linux-build') {
2016-10-25 21:35:31 +00: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 21:35:31 +00:00
}
}
}
return myNode
}
2016-10-25 19:40:03 +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
}
}
return tasks
}
pipeline {
options {
disableConcurrentBuilds()
2019-11-21 22:51:33 +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 21:35:31 +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...>)"