added Jenkinsfile-stats and calculate_stats.sh
This commit is contained in:
parent
07d14666ba
commit
4cacd1a13e
29
Jenkinsfile-stats
Normal file
29
Jenkinsfile-stats
Normal 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
3
calculate_stats.sh
Normal file
@ -0,0 +1,3 @@
|
||||
#!/bin/bash
|
||||
|
||||
wc -l result.txt > stats.txt
|
Loading…
Reference in New Issue
Block a user