-
Notifications
You must be signed in to change notification settings - Fork 0
/
Jenkinsfile
48 lines (48 loc) · 1.18 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
pipeline {
agent any
stages {
stage('Install python modules') {
steps {
sh './docker/run "pip install -r requirements.txt"'
}
}
stage('Copy secrets') {
steps {
sh 'cp .env.example .env'
}
}
stage('Data creation') {
steps {
sh './docker/run "python -m tasks.data_creation"'
}
}
stage('Model preprocessing') {
steps {
sh './docker/run "python -m tasks.model_preprocessing"'
}
}
stage('Model preparation') {
steps {
sh './docker/run "python -m tasks.model_preparation"'
}
}
stage('Model testing') {
steps {
sh './docker/run "python -m tasks.model_testing"'
}
}
stage('Build production Docker image') {
when { tag "release-v*" }
steps {
sh 'docker build . -f ./stages/production/Dockerfile.app -t sergiobelevskij/simple-ml-pipeline:$(git describe)'
}
}
stage('Push production image to Dockerhub') {
when { tag "release-v*" }
steps {
echo 'Deploying only because this commit is tagged...'
sh 'docker push sergiobelevskij/simple-ml-pipeline:$(git describe)'
}
}
}
}