ium_464863/statistics/Jenkinsfile
2024-03-29 17:28:57 +01:00

37 lines
862 B
Groovy

pipeline {
agent {
docker {
image 'dzikafoczka/ium:1.0'
}
}
parameters {
buildSelector(
defaultSelector: lastSuccessful(),
description: 'Build to extract artifacts from',
name: 'BUILD_SELECTOR'
)
}
stages {
stage('Clone repository') {
steps {
checkout scm
}
}
stage('Copy artifacts') {
steps {
copyArtifacts projectName: 'z-s464863-create-dataset', selector: buildParameter('BUILD_SELECTOR')
}
}
stage('Get statistics') {
steps {
sh "chmod +x get_stats.py"
sh "python3 get_stats.py"
archiveArtifacts artifacts: 'stats.txt', onlyIfSuccessful: true
}
}
}
}