fix pipeline and add echo to data.sh

This commit is contained in:
Dawid 2021-03-28 21:00:30 +02:00
parent 50f27e3fd1
commit 468d24acde
2 changed files with 7 additions and 1 deletions

5
Jenkinsfile vendored
View File

@ -1,6 +1,8 @@
pipeline{
agent any
properties([parameters([text(defaultValue: '100', description: 'Number of lines to cutoff', name: 'CUTOFF')])])
parameters {
string(defaultValue: '100', description: 'Number of lines to cutoff', name: 'CUTOFF', trim: false)
}
stages{
stage('Stage 1'){
steps{
@ -15,6 +17,7 @@ pipeline{
stage('sh: Shell Script'){
steps{
withEnv(["CUTOFF=${params.CUTOFF}"])
sh "chmod 777 ./script.sh"
./data.sh
}
}

View File

@ -1,6 +1,9 @@
#!/bin/bash
echo "pobieram dane"
curl -OL https://git.wmi.amu.edu.pl/s434804/ium_434804/raw/branch/master/country_vaccinations.csv
echo "CUTOFF danych"
head -n -1 country_vaccinations.csv | tail -n +$((${CUTOFF}+1)) > country_vaccinations.csv | shuf > vaccines.csv.shuf
echo "Wielkość zbioru"
wc -l vaccines.csv
head -n 1468 vaccines.csv.shuf > test.csv
head -n 2936 vaccines.csv.shuf | tail -n 1468 > validation.csv