Add dataset-stats Jenkinsfile

This commit is contained in:
Marek Moryl 2023-04-21 10:36:24 +02:00
parent de49bab0b1
commit 9fffafc1a8
3 changed files with 31 additions and 1 deletions

View File

@ -24,7 +24,6 @@ pipeline {
stage('Prepare data') {
steps {
withEnv(["KAGGLE_USERNAME=${params.KAGGLE_USERNAME}", "KAGGLE_KEY=${params.KAGGLE_KEY}"]) {
sh 'cd ium_z487183'
sh './get-data.sh'
sh 'python3 prepare_dataset.py'
}

23
JenkinsfileDatasetStats Normal file
View File

@ -0,0 +1,23 @@
pipeline {
agent any
parameters{
buildSelector(
defaultSelector: lastSuccessful(),
description: 'Which build to use for copying artifacts',
name: 'BUILD_SELECTOR'
)
}
stages {
stage('Copy artifacts') {
steps {
copyArtifacts filter: 'X_test.csv,X_val.csv,X_train.csv,Y_test.csv,Y_val.csv,Y_train.csv', fingerprintArtifacts: true, projectName: 'z487183-create-dataset', selector: workspace()
}
}
stage('Prepare stats') {
steps {
sh './prepare-stats.sh'
archiveArtifacts 'stats.txt'
}
}
}
}

8
prepare-stats.sh Executable file
View File

@ -0,0 +1,8 @@
#!/bin/bash
touch stats.txt
wc -l X_test.csv >> stats.txt
wc -l X_val.csv >> stats.txt
wc -l X_train.csv >> stats.txt
wc -l Y_test.csv >> stats.txt
wc -l Y_val.csv >> stats.txt
wc -l Y_train.csv >> stats.txt