add stats
This commit is contained in:
parent
d6946ea0da
commit
c7f0b2f97b
47
JenkinsfileStats
Normal file
47
JenkinsfileStats
Normal file
@ -0,0 +1,47 @@
|
||||
pipeline {
|
||||
agent any
|
||||
|
||||
properties([parameters([
|
||||
buildSelector(
|
||||
defaultSelector: lastSuccessful(),
|
||||
description: 'Which build to use for copying artifacts',
|
||||
name: 'BUILD_SELECTOR')
|
||||
])])
|
||||
|
||||
parameters {
|
||||
string(
|
||||
defaultValue: '',
|
||||
description: 'Build selector for Copy artifact',
|
||||
name: 'BUILD_SELECTOR'
|
||||
)
|
||||
}
|
||||
|
||||
stages {
|
||||
stage('Clone Repository') {
|
||||
steps {
|
||||
git branch='main', url: 'https://git.wmi.amu.edu.pl/s495715/iumKC.git'
|
||||
}
|
||||
}
|
||||
|
||||
stage('Copy Artifacts') {
|
||||
steps {
|
||||
script {
|
||||
def buildSelector = params.BUILD_SELECTOR ?: 'lastSuccessful()'
|
||||
copyArtifacts fingerprintArtifacts: true, projectName: 'z-s495715-create-dataset', selector: buildParameter('BUILD_SELECTOR')
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
stage('Execute Script') {
|
||||
steps {
|
||||
sh './calculate_stats.sh'
|
||||
}
|
||||
}
|
||||
|
||||
stage('Archive Results') {
|
||||
steps {
|
||||
archiveArtifacts artifacts: 'stats.txt', onlyIfSuccessful: true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
0
calculate_stats.sh
Normal file
0
calculate_stats.sh
Normal file
Loading…
Reference in New Issue
Block a user