add stats
This commit is contained in:
parent
d6946ea0da
commit
cbef3c153a
38
JenkinsfileStats
Normal file
38
JenkinsfileStats
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
pipeline {
|
||||||
|
agent any
|
||||||
|
|
||||||
|
parameters {
|
||||||
|
buildSelector(
|
||||||
|
defaultSelector: lastSuccessful(),
|
||||||
|
description: 'Which build to use for copying artifacts',
|
||||||
|
name: 'BUILD_SELECTOR')
|
||||||
|
}
|
||||||
|
|
||||||
|
stages {
|
||||||
|
stage('Checkout') {
|
||||||
|
steps {
|
||||||
|
git branch: 'main', url: 'https://git.wmi.amu.edu.pl/s495715/iumKC.git'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Copy Artifacts') {
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
copyArtifacts fingerprintArtifacts: true, projectName: 'z-s495715-create-dataset', selector: buildParameter('BUILD_SELECTOR')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Execute Script') {
|
||||||
|
steps {
|
||||||
|
sh 'chmod +x calculate_stats.sh && ./calculate_stats.sh'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Archive Results') {
|
||||||
|
steps {
|
||||||
|
archiveArtifacts artifacts: 'stats.txt', onlyIfSuccessful: true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
1
calculate_stats.sh
Normal file
1
calculate_stats.sh
Normal file
@ -0,0 +1 @@
|
|||||||
|
wc -l calculate_stats.sh
|
Loading…
Reference in New Issue
Block a user