added Jenkinsfile-stats and calculate_stats.sh

This commit is contained in:
s464906 2024-03-26 22:07:25 +01:00
parent 07d14666ba
commit 4cacd1a13e
2 changed files with 32 additions and 0 deletions

29
Jenkinsfile-stats Normal file
View File

@ -0,0 +1,29 @@
pipeline {
agent any
parameters {
choice(name: 'BUILD_SELECTOR', choices: '', description: 'Which build to use for copying artifacts')
}
stages {
stage('Copy artifacts') {
steps {
script {
copyArtifacts fingerprintArtifacts: true, projectName: 's464906-create-dataset', selector: buildParameter('BUILD_SELECTOR')
}
}
}
stage('Run shell script') {
steps {
script {
sh './calculate_stats.sh'
}
}
post {
success {
archiveArtifacts artifacts: 'stats.txt', allowEmptyArchive: true
}
}
}
}
}

3
calculate_stats.sh Normal file
View File

@ -0,0 +1,3 @@
#!/bin/bash
wc -l result.txt > stats.txt