3
0
mirror of https://github.com/triqs/dft_tools synced 2024-12-21 11:53:41 +01:00
dft_tools/Jenkinsfile
2018-02-12 14:11:41 -05:00

35 lines
887 B
Groovy

properties([
disableConcurrentBuilds(),
pipelineTriggers([
upstream(
threshold: 'SUCCESS',
upstreamProjects: '/TRIQS/triqs/' + env.BRANCH_NAME.replaceAll('/', '%2F')
)
])
])
def platforms = [:]
def dockerPlatforms = ["ubuntu-clang", "ubuntu-gcc", "centos-gcc"]
for (int i = 0; i < dockerPlatforms.size(); i++) {
def platform = dockerPlatforms[i]
platforms[platform] = { ->
stage(platform) {
timeout(time: 1, unit: 'HOURS') {
node('docker') {
checkout scm
/* construct a Dockerfile for this base */
sh '''
( echo "FROM flatironinstitute/triqs:$BRANCH_NAME-$STAGE_NAME" ; sed '0,/^FROM /d' Dockerfile ) > Dockerfile.jenkins
mv -f Dockerfile.jenkins Dockerfile
'''
/* build and tag */
def img = docker.build("flatironinstitute/dft_tools:${env.BRANCH_NAME}-${env.STAGE_NAME}")
}
}
}
}
}
parallel platforms