IUM_03 - add pipeline and bash script for statistics extraction

This commit is contained in:
Paweł Łączkowski 2024-03-20 19:01:16 +01:00
parent ef6574d2eb
commit b50dca6406
2 changed files with 36 additions and 1 deletions

View File

@ -1 +1,3 @@
# TODO
#!/bin/bash
# Get number of rows in data.csv
wc -l < data.csv > data_size.txt

33
statistics/Jenkinsfile vendored Normal file
View File

@ -0,0 +1,33 @@
pipeline {
agent any
parameters {
buildSelector(
defaultSelector: lastSuccessful(),
description: 'Build to extract artifacts from',
name: 'BUILD_SELECTOR'
)
}
stages {
stage('Clone repository') {
steps {
checkout scm
}
}
stage('Copy artifacts') {
steps {
copyArtifacts projectName: 'z-s464863-create-dataset', filter: artifact, selector: buildParameter('BUILD_SELECTOR')
}
}
}
stage('Get statistics') {
steps {
sh "./get_stats.sh"
archiveArtifacts artifacts: 'stats.txt', onlyIfSuccessful: true
}
}
}
}