Changed Jenkinsfile
This commit is contained in:
parent
df6de91789
commit
9930d2694d
40
Jenkinsfile
vendored
40
Jenkinsfile
vendored
@ -1,27 +1,39 @@
|
|||||||
node {
|
pipeline {
|
||||||
stage('Preparation') {
|
agent any
|
||||||
properties([
|
|
||||||
parameters([
|
parameters {
|
||||||
string(
|
string(
|
||||||
defaultValue: 'tomaszzitkiewicz',
|
defaultValue: 'gulczas',
|
||||||
description: 'Kaggle username',
|
description: 'Kaggle username',
|
||||||
name: 'KAGGLE_USERNAME',
|
name: 'KAGGLE_USERNAME',
|
||||||
trim: false
|
trim: false
|
||||||
),
|
)
|
||||||
password(
|
password(
|
||||||
defaultValue: '',
|
defaultValue: '',
|
||||||
description: 'Kaggle token taken from kaggle.json file, as described in https://github.com/Kaggle/kaggle-api#api-credentials',
|
description: 'Kaggle token taken from kaggle.json file, as described in https://github.com/Kaggle/kaggle-api#api-credentials',
|
||||||
name: 'KAGGLE_KEY'
|
name: 'KAGGLE_KEY'
|
||||||
)
|
)
|
||||||
])
|
|
||||||
])
|
|
||||||
}
|
}
|
||||||
stage('Build') {
|
|
||||||
// Run the maven build
|
stages {
|
||||||
withEnv(["KAGGLE_USERNAME=${params.KAGGLE_USERNAME}",
|
stage('Clone Repository') {
|
||||||
"KAGGLE_KEY=${params.KAGGLE_KEY}" ]) {
|
steps {
|
||||||
sh 'echo KAGGLE_USERNAME: $KAGGLE_USERNAME'
|
git 'https://git.wmi.amu.edu.pl/s464953/ium_464953.git'
|
||||||
sh 'kaggle datasets download brunoalercon123/top-200-spotify-songs-dataset'
|
}
|
||||||
|
}
|
||||||
|
stage('Run Script') {
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
withEnv(["KAGGLE_USERNAME=${params.KAGGLE_USERNAME}", "KAGGLE_KEY=${params.KAGGLE_KEY}"]) {
|
||||||
|
sh 'bash download_dataset.sh $KAGGLE_USERNAME $KAGGLE_KEY'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
stage('Archive Artifacts') {
|
||||||
|
steps {
|
||||||
|
archiveArtifacts artifacts: 'artifacts/*', onlyIfSuccessful: true
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user