forked from DFO-Ocean-Navigator/Ocean-Data-Map-Project
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathJenkinsfile
More file actions
53 lines (45 loc) · 1.73 KB
/
Jenkinsfile
File metadata and controls
53 lines (45 loc) · 1.73 KB
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
pipeline {
agent any
stages {
stage('Build') {
steps {
slackSend(color: '#FFFF00', message: "STARTED: Job '${env.JOB_NAME} [${env.BUILD_NUMBER}]' (${env.BUILD_URL})")
echo 'Pulling...'+env.BRANCH_NAME
checkout scm
echo 'Building Javascript files'
sh '''
#!/usr/bin/env bash
frontend_dir=${WORKSPACE}/oceannavigator/frontend
npm --prefix $frontend_dir install
npm --prefix $frontend_dir run build
'''
echo 'Running Python tests'
sh '''
#!/usr/bin/env bash
py=/opt/tools/miniconda3/envs/navigator/bin/python
$py -m unittest tests/test_geo.py
$py -m unittest tests/test_nemo.py
$py -m unittest tests/test_merc.py
$py -m unittest tests/test_fvcom.py
$py -m unittest tests/test_oceannavigator_cfg.py
$py -m unittest tests/test_datasetconfig.py
$py -m unittest tests/test_sqlite_database.py
$py -m unittest tests/test_data_open_dataset.py
$py -m unittest tests/test_api_v_1_0.py
$py -m unittest tests/test_calculated_data.py
$py -m unittest tests/test_calculated_parser.py
$py -m unittest tests/test_variable.py
$py -m unittest tests/test_variable_list.py
'''
}
}
}
post {
success {
slackSend(color: '#00FF00', message: "SUCCESSFUL: Job '${env.JOB_NAME} [${env.BUILD_NUMBER}]' (${env.BUILD_URL})")
}
failure {
slackSend(color: '#FF0000', message: "FAILED: Job '${env.JOB_NAME} [${env.BUILD_NUMBER}]' (${env.BUILD_URL})")
}
}
}