fix jenkinsfile and add download.sh

This commit is contained in:
Maciej Czajka 2022-03-25 20:40:44 +01:00
parent e8c18bb445
commit f8f5eab816
2 changed files with 44 additions and 0 deletions

32
Jenkinsfile vendored
View File

@ -31,5 +31,37 @@ pipeline {
checkout([$class: 'GitSCM', branches: [[name: '*/master']], extensions: [], userRemoteConfigs: [[credentialsId: 's444356', url: 'https://git.wmi.amu.edu.pl/s444356/ium_444356.git']]])
}
}
stage('Script'){
steps {
sh './download.sh'
}
}
stage('Preparation') {
properties([
parameters([
string(
defaultValue: 'maciejczajka',
description: 'Kaggle username',
name: 'KAGGLE_USERNAME',
trim: false
),
password(
defaultValue: '',
description: 'Kaggle token taken from kaggle.json file, as described in https://github.com/Kaggle/kaggle-api#api-credentials',
name: 'KAGGLE_KEY'
)
])
])
}
stage('Build') {
// Run the maven build
withEnv(["KAGGLE_USERNAME=${params.KAGGLE_USERNAME}",
"KAGGLE_KEY=${params.KAGGLE_KEY}" ]) {
sh 'echo KAGGLE_USERNAME: $KAGGLE_USERNAME'
sh 'kaggle datasets list'
}
}
}
}

12
download.sh Executable file
View File

@ -0,0 +1,12 @@
dataset_operation() {
cat all_games.csv | gshuf > all_games.csv.shuf
head -n 1880 all_games.csv.shuf > all_games.csv.test
head -n 3760 all_games.csv.shuf | tail -n 1880 > all_games.csv.dev
tail -n +3761 all_games.csv.shuf > all_games.csv.train
rm all_games.csv.shuf
wc -l all_games.csv.*
}
kaggle datasets download -d deepcontractor/top-video-games-19952021-metacritic
unzip top-video-games-19952021-metacritic.zip
dataset_operation