forked from ThoughtWorksInc/CD4ML-Scenarios
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathJenkinsfile
43 lines (43 loc) · 1.15 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
pipeline {
agent any
triggers {
// Poll SCM every minute for new changes
pollSCM('* * * * *')
}
options {
// add timestamps to output
timestamps()
}
environment {
MLFLOW_TRACKING_URL = 'http://mlflow:5000'
}
stages {
stage('Install dependencies') {
steps {
echo 'Starting Build'
sh 'pip3 install -r requirements.txt'
}
}
stage('Run tests') {
steps {
sh './run_tests.sh'
}
}
stage('Run ML pipeline') {
steps {
sh 'python3 run_python_script.py pipeline'
}
}
// stage('Acceptance test') {
// steps {
// sh 'python3 run_python_script.py acceptance'
// }
// }
stage('Deploy model') {
steps {
sh 'curl --request POST --data-binary "@data/models/model.pkl" http://model:5005/replace_model'
sh 'curl --request POST --data-binary "@data/models/encoder.json" http://model:5005/replace_encoder'
}
}
}
}