ium_464913/stats/Jenkinsfile
2024-03-24 12:41:33 +01:00

35 lines
792 B
Groovy

pipeline {
agent any
parameters {
buildSelector(
defaultSelector: lastSuccessful(),
description: 'Which build to use for copying artifacts',
name: 'BUILD_SELECTOR'
)
}
stages {
stage('Clone Repository') {
steps {
git branch: 'main', url: 'https://git.wmi.amu.edu.pl/s464913/ium_464913.git'
}
}
stage('Copy Artifacts') {
steps {
copyArtifacts filter: 'data/*', projectName: 'z-s464913-create-dataset', selector: buildParameter('BUILD_SELECTOR')
}
}
stage('Generate Report') {
steps {
sh 'chmod +x stats.sh'
sh './stats.sh'
}
}
stage('Archive Artifacts') {
steps {
archiveArtifacts artifacts: 'stats/*', onlyIfSuccessful: true
}
}
}
}