forked from IDAES/examples-pse
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Jenkinsfile
55 lines (54 loc) · 1.45 KB
/
Jenkinsfile
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
48
49
50
51
52
53
54
55
pipeline {
agent {
docker {
image 'conda/miniconda3-centos7:latest'
}
}
stages {
stage('root-setup') {
steps {
slackSend (message: "Build Started - ${env.JOB_NAME} ${env.BUILD_NUMBER} (<${env.BUILD_URL}|Open>)")
sh 'yum install -y gcc g++ git gcc-gfortran libboost-dev make'
dir('idaes-dev') {
git url: 'https://github.com/makaylas/idaes-dev.git',
credentialsId: '6ca01274-150a-4dd4-96ec-f0d117b0ea95'
}
}
}
stage('idaes-dev setup') {
steps {
sh '''
cd idaes-dev
conda create -n idaes python=3.7 pytest
source activate idaes
pip install -r requirements-dev.txt --user jenkins
export TEMP_LC_ALL=$LC_ALL
export TEMP_LANG=$LANG
export LC_ALL=en_US.utf-8
export LANG=en_US.utf-8
python setup.py install
export LC_ALL=$TEMP_LC_ALL
export LANG=$TEMP_LANG
conda deactivate
'''
}
}
stage('examples-dev test') {
steps {
sh '''
source activate idaes
pytest tests/
conda deactivate
'''
}
}
}
post {
success {
slackSend (color: '#00FF00', message: "SUCCESSFUL - ${env.JOB_NAME} ${env.BUILD_NUMBER} (<${env.BUILD_URL}|Open>)")
}
failure {
slackSend (color: '#FF0000', message: "FAILED - ${env.JOB_NAME} ${env.BUILD_NUMBER} (<${env.BUILD_URL}|Open>)")
}
}
}