ium_464863/statistics/Jenkinsfile
2024-03-29 15:40:28 +01:00

37 lines
865 B
Groovy

pipeline {
agent {
docker {
image 'dzikafoczka/ium:latest'
}
}
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
}
}
}
}