s416138-mlworkshops/Jenkinsfile

44 lines
1.8 KiB
Groovy

pipeline {
agent { dockerfile true }
stages {
//Niepotrzebne jezeli Jenkinsfile jest pobierany z repo.
stage('Checkout') {
steps{
checkout([$class: 'GitSCM', branches: [[name: '*/master']], doGenerateSubmoduleConfigurations: false, extensions: [], submoduleCfg: [], userRemoteConfigs: [[url: 'https://git.wmi.amu.edu.pl/s416138/s416138-mlworkshops']]])
}
}
stage('Copy results'){
steps {
copyArtifacts filter: 'wikiniews_results.tsv', fingerprintArtifacts: true, projectName: 'ASR-eval', selector: lastSuccessful()
}
}
stage('Count lines'){
steps{
sh label: '', script: './count_lines.sh wikiniews_results.tsv'
}
}
stage('Count metrics'){
steps{
sh label: '', script: './count_metrics.sh wikiniews_results.tsv'
}
}
stage('Accumulate metrics results'){
steps{
copyArtifacts filter: 'srr.txt, wer.txt', fingerprintArtifacts: true, optional: true, projectName: 's416138-metrics', target: 'last-results'
if(fileExists('last-results/srr.txt') && fileExists('last-results/wer.txt')){
sh label: '', script: './append_to_file.sh last-results/srr.txt srr.txt'
sh label: '', script: './append_to_file.sh last-results/wer.txt wer.txt'
}
}
}
stage('Archive results'){
steps{
archiveArtifacts 'counted_lines.txt'
archiveArtifacts 'srr.txt'
archiveArtifacts 'wer.txt'
archiveArtifacts 'wikiniews_results_with_wer.tsv'
}
}
}
}