3
0
mirror of https://github.com/triqs/dft_tools synced 2024-12-30 16:15:47 +01:00

[jenkins] add triqs-docker-based linux builds

This commit is contained in:
Dylan Simon 2018-02-12 14:11:41 -05:00
parent 1158e2cacc
commit 64a45510c8
3 changed files with 47 additions and 0 deletions

3
.dockerignore Normal file
View File

@ -0,0 +1,3 @@
.git
Dockerfile
Jenkinsfile

10
Dockerfile Normal file
View File

@ -0,0 +1,10 @@
# See ../triqs/packaging for other options
FROM flatironinstitute/triqs:master-ubuntu-clang
COPY . ${SRC}/dft_tools
WORKDIR ${BUILD}/dft_tools
RUN chown build .
USER build
RUN cmake ${SRC}/dft_tools -DTRIQS_ROOT=${INSTALL} && make -j2 && make test
USER root
RUN make install

34
Jenkinsfile vendored Normal file
View File

@ -0,0 +1,34 @@
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