2024-03-20 14:02:25 +01:00
|
|
|
pipeline {
|
|
|
|
agent any
|
|
|
|
|
2024-03-20 14:13:51 +01:00
|
|
|
parameters {
|
2024-03-20 14:02:25 +01:00
|
|
|
buildSelector(
|
|
|
|
defaultSelector: lastSuccessful(),
|
|
|
|
description: 'Which build to use for copying artifacts',
|
|
|
|
name: 'BUILD_SELECTOR')
|
|
|
|
}
|
|
|
|
stages {
|
|
|
|
stage('Checkout') {
|
|
|
|
steps {
|
|
|
|
checkout scm
|
|
|
|
}
|
|
|
|
}
|
|
|
|
stage('Copy Artifacts') {
|
|
|
|
steps {
|
|
|
|
withEnv(["BUILD_SELECTOR=${params.BUILD_SELECTOR}" ]) {
|
|
|
|
copyArtifacts fingerprintArtifacts: true, projectName: 'z-s464903-create-dataset', selector: buildParameter('$BUILD_SELECTOR')}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
stage('Execute Shell Script') {
|
|
|
|
steps {
|
|
|
|
script {
|
|
|
|
sh 'chmod +x data_counting_script.sh'
|
|
|
|
sh './data_counting_script.sh'
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
stage('Archive Results') {
|
|
|
|
steps {
|
|
|
|
// Archiwizacja pliku wynikowego
|
|
|
|
archiveArtifacts artifacts: 'stats.txt', onlyIfSuccessful: true
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|