mirror of
https://github.com/triqs/dft_tools
synced 2024-12-27 06:43:40 +01:00
35 lines
887 B
Plaintext
35 lines
887 B
Plaintext
|
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
|