Add script for zadanie 3.6

This commit is contained in:
Zofia Galla 2021-03-28 17:40:07 +02:00
parent 178dc83c6d
commit c9a5429f00
2 changed files with 25 additions and 5 deletions

12
Jenkinsfile vendored
View File

@ -3,10 +3,18 @@ pipeline {
stages { stages {
stage('Hello') { stage('Sh script') {
steps { steps {
echo 'Hello World' withEnv(["KAGGLE_USERNAME=${params.KAGGLE_USERNAME}",
"KAGGLE_KEY=${params.KAGGLE_KEY}" ]) {
sh 'chmod +x jenkins_script.sh'
sh './jenkins_script.sh'
} }
}
}
stage('Archive artifacts') {
archiveArtifacts artifacts: 'netflix_split_*.csv'
} }
} }
} }

12
jenkins_script.sh Normal file
View File

@ -0,0 +1,12 @@
#!/bin/bash
kaggle kernels output 'eugenioscionti/scraping-rotten-tomatoes-to-enrich-netflix-dataset'
head -n 1 netflix_titles_enriched.csv >> header.csv
sed '1d' netflix_titles_enriched.csv | shuf | split -l $[ ($(wc -l netflix_titles_enriched.csv | cut -d" " -f1) - 1) * 60 / 100 ]
cat header.csv >> netflix_split_train.csv
cat header.csv >> netflix_split_test.csv
cat header.csv >> netflix_split_validation.csv
cat xaa >> netflix_split_train.csv
mv xab split_test_val
split -n l/2 split_test_val
cat xaa >> netflix_split_test.csv
cat xab >> netflix_split_validation.csv