ium_464906/Jenkinsfile-stats

54 lines
1.3 KiB
Plaintext
Raw Permalink Normal View History

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