Jenkins script mod
This commit is contained in:
parent
78d8bf5fc4
commit
56e93c6c86
40
Jenkinsfile
vendored
40
Jenkinsfile
vendored
@ -1,41 +1,35 @@
|
|||||||
pipeline {
|
node {
|
||||||
agent any
|
stage('Preparation') {
|
||||||
parameters {
|
properties ([
|
||||||
|
parameters([
|
||||||
string(
|
string(
|
||||||
defaultValue:'mateuszogrodowczyk',
|
defaultValue:'mateuszogrodowczyk',
|
||||||
description: 'Kaggle username',
|
description: 'Kaggle username',
|
||||||
name: 'KAGGLE_USERNAME',
|
name: 'KAGGLE_USERNAME',
|
||||||
trim: false
|
trim: false
|
||||||
)
|
),
|
||||||
password(
|
password(
|
||||||
defaultValue: '',
|
defaultValue: '',
|
||||||
description: 'Kaggle access token retrieved from kaggle.json file - https://github.com/Kaggle/kaggle-api#api-credentials',
|
description: 'Kaggle access token retrieved from kaggle.json file - https://github.com/Kaggle/kaggle-api#api-credentials',
|
||||||
name: 'KAGGLE_KEY'
|
name: 'KAGGLE_KEY'
|
||||||
)
|
)
|
||||||
|
])
|
||||||
|
])
|
||||||
}
|
}
|
||||||
environment {
|
}
|
||||||
KAGGLE_USERNAME="$params.KAGGLE_USERNAME"
|
|
||||||
KAGGLE_KEY="$params.KAGGLE_KEY"
|
stage('Install depends.') {
|
||||||
}
|
sh 'pip install --user -r requirements.txt'
|
||||||
stages {
|
}
|
||||||
stage('Install depends.') {
|
stage('Prepare dataset') {
|
||||||
steps {
|
|
||||||
sh "pip install --user -r requirements.txt"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
stage('Prepare dataset') {
|
|
||||||
steps {
|
|
||||||
script {
|
|
||||||
withEnv([
|
withEnv([
|
||||||
"KAGGLE_USERNAME=${params.KAGGLE_USERNAME}",
|
"KAGGLE_USERNAME=${params.KAGGLE_USERNAME}",
|
||||||
"KAGGLE_KEY=${params.KAGGLE_KEY}"
|
"KAGGLE_KEY=${params.KAGGLE_KEY}"
|
||||||
])
|
]) {
|
||||||
sh 'echo Welcome: $KAGGLE_USERNAME'
|
sh 'echo Welcome: $KAGGLE_USERNAME'
|
||||||
sh 'kaggle datasets list'
|
sh 'kaggle datasets list'
|
||||||
}
|
}
|
||||||
sh "chmod u+x ./load_data.sh"
|
|
||||||
sh "./load_data.sh"
|
sh 'chmod u+x ./load_data.sh'
|
||||||
}
|
sh './load_data.sh'
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user