47 lines
1.4 KiB
Plaintext
47 lines
1.4 KiB
Plaintext
pipeline {
|
|
agent {
|
|
docker {
|
|
image 'python:3.11'
|
|
args '-v /root/.cache:/root/.cache -u root'
|
|
}
|
|
}
|
|
parameters {
|
|
gitParameter name: 'BRANCH', type: 'PT_BRANCH'
|
|
buildSelector(name: 'BUILD_NUMBER', description: 'Wybierz numer buildu', defaultSelector: lastSuccessful())
|
|
nameSelector(name: 'NAME', description: 'Wybierz nazwe', defaultSelector: 's487187-training/%00')
|
|
}
|
|
stages {
|
|
stage('Preparation') {
|
|
steps {
|
|
sh 'pip install pandas tensorflow scikit-learn matplotlib'
|
|
}
|
|
}
|
|
stage('Pobierz dane') {
|
|
steps {
|
|
script {
|
|
copyArtifacts(projectName: 's487187-create-dataset', fingerprintArtifacts: true)
|
|
}
|
|
}
|
|
}
|
|
stage('Pobierz model') {
|
|
steps {
|
|
script {
|
|
copyArtifacts(projectName: specific("${params.NAME}"), selector: specific("${params.BUILD_NUMBER}"), fingerprintArtifacts: true)
|
|
}
|
|
}
|
|
}
|
|
stage('Ewaluuj model') {
|
|
steps {
|
|
script {
|
|
sh "python3 evaluate.py"
|
|
}
|
|
}
|
|
}
|
|
stage('Zarchiwizuj wyniki') {
|
|
steps {
|
|
archiveArtifacts artifacts: 'metrics.txt,plot.png', fingerprint: true
|
|
}
|
|
}
|
|
}
|
|
}
|