add script for dataset-stats

This commit is contained in:
jakubknczny 2021-03-28 18:27:27 +02:00
parent 767e19f21a
commit 7feb78d4f2
2 changed files with 13 additions and 5 deletions

View File

@ -1,17 +1,20 @@
pipeline {
agent any
properties([parameters([
buildSelector(
defaultSelector: lastSuccessful(),
description: 'Which build to use for copying artifacts',
name: 'BUILD_SELECTOR')
])])
stages {
stage('copy artifacts') {
steps {
copyArtifacts fingerprintArtifacts: true, projectName: 's470607-create-dataset', selector: lastSuccessful()
copyArtifacts fingerprintArtifacts: true, projectName: 's470607-create-dataset', selector: buildParameter('BUILD_SELECTOR')
}
}
stage('stats') {
steps {
sh 'wc -l train.csv > stats.txt'
sh 'wc -l test.csv >> stats.txt'
sh 'wc -l valid.csv >> stats.txt'
sh 'chmod +x dataset-stats.sh'
}
}
stage('archive artifacts') {

5
dataset-stats.sh Normal file
View File

@ -0,0 +1,5 @@
#!/bin/bash
sh 'wc -l train.csv > stats.txt'
sh 'wc -l test.csv >> stats.txt'
sh 'wc -l valid.csv >> stats.txt'