Added first pipeline steps
This commit is contained in:
parent
0a01edd485
commit
77d168a6f2
36
Jenkinsfile
vendored
36
Jenkinsfile
vendored
@ -1,10 +1,40 @@
|
|||||||
pipeline {
|
pipeline {
|
||||||
agent any
|
agent any
|
||||||
|
parameters {
|
||||||
|
string(
|
||||||
|
defaultValue: 'marcinkostrzewski',
|
||||||
|
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'
|
||||||
|
)
|
||||||
|
}
|
||||||
|
environment {
|
||||||
|
KAGGLE_USERNAME="$params.KAGGLE_USERNAME"
|
||||||
|
KAGGLE_KEY="$params.KAGGLE_KEY"
|
||||||
|
}
|
||||||
stages {
|
stages {
|
||||||
stage('Stage 1') {
|
stage('Install dependencies') {
|
||||||
steps {
|
steps {
|
||||||
echo 'Hello world!'
|
sh "pip install --user -r requirements.txt"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
stage('Fetch and split dataset') {
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
withEnv(["KAGGLE_USERNAME=${params.KAGGLE_USERNAME}",
|
||||||
|
"KAGGLE_KEY=${params.KAGGLE_KEY}" ]) {
|
||||||
|
sh 'echo KAGGLE_USERNAME: $KAGGLE_USERNAME'
|
||||||
|
sh 'kaggle datasets list'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
sh "chmod u+x ./download_dataset.sh"
|
||||||
|
sh "./download_dataset.sh"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user