ium_464906/Jenkinsfile-stats
2024-04-02 20:39:35 +02:00

54 lines
1.3 KiB
Plaintext

pipeline {
agent {
docker { image 'golebiewska/ium:1.0' }
}
parameters {
buildSelector(
defaultSelector: lastSuccessful(),
description: 'Which build to use for copying artifacts',
name: 'BUILD_SELECTOR'
)
string(
defaultValue: '1000',
description: 'CUTOFF',
name: 'CUTOFF',
trim: false
)
}
stages {
stage('Copy artifacts') {
steps {
script {
copyArtifacts fingerprintArtifacts: true, projectName: 'z-s464906-create-dataset', selector: buildParameter('BUILD_SELECTOR')
}
}
post {
success {
echo 'Artifacts copied successfully.'
}
}
}
stage('Set execute permission') {
steps {
script {
sh 'chmod +x calculate_stats.sh'
}
}
}
stage('Run shell script') {
steps {
script {
sh './calculate_stats.sh'
}
}
post {
success {
archiveArtifacts artifacts: 'stats.txt', allowEmptyArchive: true
}
}
}
}
}