add stats

This commit is contained in:
Karol Cyganik 2024-03-26 20:14:31 +01:00
parent d6946ea0da
commit 4fc467cff7
2 changed files with 40 additions and 0 deletions

40
JenkinsfileStats Normal file
View File

@ -0,0 +1,40 @@
pipeline {
agent any
parameters {
string(
defaultValue: '',
description: 'Build selector for Copy artifact',
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 {
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
View File