40 lines
1.1 KiB
Plaintext
40 lines
1.1 KiB
Plaintext
![]() |
pipeline {
|
||
|
agent any
|
||
|
|
||
|
stages {
|
||
|
stage('Clone repository') {
|
||
|
steps {
|
||
|
checkout scm
|
||
|
}
|
||
|
}
|
||
|
|
||
|
stage('Copy artifacts') {
|
||
|
agent {
|
||
|
dockerfile {
|
||
|
filename 'Dockerfile'
|
||
|
reuseNode true
|
||
|
}
|
||
|
}
|
||
|
|
||
|
steps {
|
||
|
copyArtifacts(projectName: 's464863-training/main', filter: 'models/model.pth, datasets/test.csv', selector: lastSuccessful())
|
||
|
copyArtifacts(projectName: 's464863-evaluation/main', filter: 'metrics.csv', selector: lastSuccessful(), optional: true)
|
||
|
}
|
||
|
}
|
||
|
|
||
|
stage('Evaluate model') {
|
||
|
agent {
|
||
|
dockerfile {
|
||
|
filename 'Dockerfile'
|
||
|
reuseNode true
|
||
|
}
|
||
|
}
|
||
|
|
||
|
steps {
|
||
|
sh "chmod +x ./predict.py"
|
||
|
sh "python3 ./predict.py"
|
||
|
archiveArtifacts artifacts: 'predictions.csv, metrics.csv', onlyIfSuccessful: true
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|