changed Jenkinsfile

This commit is contained in:
s464953 2024-03-24 20:40:41 +01:00
parent 0a4a608195
commit 3d81f950ce
2 changed files with 8 additions and 15 deletions

21
Jenkinsfile vendored
View File

@ -2,17 +2,8 @@ pipeline {
agent any agent any
parameters { parameters {
string( string(name: 'KAGGLE_USERNAME', defaultValue: '', description: 'Kaggle username')
defaultValue: 'gulczas', password(name: 'KAGGLE_KEY', defaultValue: '', description: 'Kaggle API key')
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'
)
} }
stages { stages {
@ -24,9 +15,11 @@ pipeline {
stage('Run Script') { stage('Run Script') {
steps { steps {
script { script {
withEnv(["KAGGLE_USERNAME=${params.KAGGLE_USERNAME}", "KAGGLE_KEY=${params.KAGGLE_KEY}"]) { withEnv([
sh 'chmod 777 ./download_dataset.sh' "KAGGLE_USERNAME=${env.KAGGLE_USERNAME}",
sh 'bash download_dataset.sh' "KAGGLE_KEY=${env.KAGGLE_KEY}"])
{
sh 'bash ./download_dataset.sh'
} }
} }
} }

View File

@ -2,7 +2,7 @@
pip install kaggle --upgrade pip install kaggle --upgrade
kaggle datasets download brunoalercon123/top-200-spotify-songs-dataset kaggle datasets download -d brunoalercon123/top-200-spotify-songs-dataset
unzip top-200-spotify-songs-dataset.zip unzip top-200-spotify-songs-dataset.zip