-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild_nightlies_pipelines
47 lines (47 loc) · 2.82 KB
/
build_nightlies_pipelines
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
pipeline {
agent {
label 'conda_builds_docker'
}
options { timestamps() }
stages {
stage('Build conda package for ROOT master') {
steps {
sh './build_master.sh --clean; ./build_master.sh --version=6.31.0 --build-number="$(date +%Y%M%d)" --test'
}
}
stage('Install and test ROOT conda package in docker container') {
steps {
sh 'docker run --pull always -t --net=host -v $(readlink -e root-feedstock/build_artifacts):/root_build --detach --name conda-nightlies quay.io/condaforge/linux-anvil-cos7-cuda:10.2'
sh 'docker cp install_conda_root.sh conda-nightlies:.'
sh 'docker cp test_conda_root.sh conda-nightlies:.'
sh 'docker exec -e ROOT_PACKAGE="root-nightly" -e CUSTOM_CONDA_CHANNEL=file:///root_build -t conda-nightlies bash -i install_conda_root.sh'
sh 'docker exec -e ROOTTEST_BRANCH=master -e JOB_DIR=/test_job -t conda-nightlies bash -i test_conda_root.sh'
}
}
stage('Publish conda package as https://root.cern/download/conda-nightly/latest') {
steps {
sh 'rm -rf root_conda_nightly_$(date +%Y%m%d) && mv root-feedstock/build_artifacts root_conda_nightly_$(date +%Y%m%d)'
sh 'tar -czvf latest_conda_nightly.tgz root_conda_nightly_$(date +%Y%m%d)'
sshPublisher(publishers: [sshPublisherDesc(configName: 'ROOT', transfers: [sshTransfer(execCommand: 'rm -rf /var/www/root/download/conda-nightly/root_conda_nightly_$(date +%Y%m%d)')])])
sshPublisher(publishers: [sshPublisherDesc(configName: 'ROOT', transfers: [sshTransfer(execCommand: 'cd /var/www/root/download/conda-nightly && tar -xzvf latest_conda_nightly.tgz && rm -f latest_conda_nightly.tgz && ln -nfs $(ls -vd1 root_conda_nightly_* | tail -n1) latest', remoteDirectory: 'conda-nightly', sourceFiles: 'latest_conda_nightly.tgz')])])
}
}
stage('Publish test results') {
steps {
sh 'rm -rf ctest_output && docker cp conda-nightlies:/test_job/ctest_output ctest_output'
xunit thresholds: [failed(failureNewThreshold: '0', failureThreshold: '12', unstableNewThreshold: '0', unstableThreshold: '11')], tools: [CTest(deleteOutputFiles: true, failIfNotNew: true, pattern: 'ctest_output/*/*.xml', skipNoTestFiles: false, stopProcessingIfError: true)]
}
}
}
post {
always {
echo 'Cleaning up!'
sh 'ls -A -1'
sh 'rm -rf conda_root llvmdev-feedstock clangdev-feedstock root-feedstock root_conda_nightly_*'
sh 'docker rm -f conda-nightlies'
}
failure {
step([$class: 'Mailer', recipients: '[email protected],[email protected]'])
}
}
}