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

View File

@ -2,7 +2,7 @@
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