ium_464962/Jenkinsfile-stats

54 lines
1.3 KiB
Plaintext
Raw Permalink Normal View History

2024-03-26 23:30:06 +01:00
pipeline {
2024-03-30 18:18:01 +01:00
agent {
2024-03-30 18:19:46 +01:00
docker { image 'raczynski/ium:1.0' }
2024-03-30 18:18:01 +01:00
}
2024-03-26 23:30:06 +01:00
parameters {
2024-03-26 23:42:31 +01:00
buildSelector(
defaultSelector: lastSuccessful(),
2024-03-26 23:30:06 +01:00
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-s464962-create-dataset', selector: buildParameter('BUILD_SELECTOR')
}
}
post {
success {
echo 'Artifacts copied successfully.'
}
}
}
stage('Set execute permission') {
steps {
script {
sh 'chmod +x dataset-stats.sh'
}
}
}
stage('Run shell script') {
steps {
script {
sh './dataset-stats.sh'
}
}
post {
success {
archiveArtifacts artifacts: 'stats.txt', allowEmptyArchive: true
}
}
}
}
}