ium_464913/stats/Jenkinsfile

39 lines
882 B
Groovy

pipeline {
agent {
docker {
image 'mateusz887/ium:version3.0'
}
}
parameters {
buildSelector(
defaultSelector: lastSuccessful(),
description: 'Which build to use for copying artifacts',
name: 'BUILD_SELECTOR'
)
}
stages {
stage('Clone Repository') {
steps {
git branch: 'main', url: 'https://git.wmi.amu.edu.pl/s464913/ium_464913.git'
}
}
stage('Copy Artifacts') {
steps {
copyArtifacts filter: 'data/*', projectName: 'z-s464913-create-dataset', selector: buildParameter('BUILD_SELECTOR')
}
}
stage('Generate Report') {
steps {
sh 'chmod +x dataset-stats.py'
sh 'python3 ./dataset-stats.py'
}
}
stage('Archive Artifacts') {
steps {
archiveArtifacts artifacts: 'stats_data/*', onlyIfSuccessful: true
}
}
}
}