mirror of
https://github.com/triqs/dft_tools
synced 2024-12-22 04:13:47 +01:00
[jenkins] add triqs-docker-based linux builds
This commit is contained in:
parent
1158e2cacc
commit
64a45510c8
3
.dockerignore
Normal file
3
.dockerignore
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
.git
|
||||||
|
Dockerfile
|
||||||
|
Jenkinsfile
|
10
Dockerfile
Normal file
10
Dockerfile
Normal 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
34
Jenkinsfile
vendored
Normal 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
|
Loading…
Reference in New Issue
Block a user