ium_464863/statistics/Jenkinsfile

33 lines
778 B
Groovy

pipeline {
agent any
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', filter: artifact, selector: buildParameter('BUILD_SELECTOR')
}
}
}
stage('Get statistics') {
steps {
sh "./get_stats.sh"
archiveArtifacts artifacts: 'stats.txt', onlyIfSuccessful: true
}
}
}
}