update jenkinsfile
This commit is contained in:
parent
8d55c6e10c
commit
f2c6fcdf0b
@ -1,12 +1,49 @@
|
|||||||
pipeline {
|
pipeline {
|
||||||
agent {
|
agent {
|
||||||
dockerfile true
|
dockerfile true
|
||||||
}
|
}
|
||||||
stages {
|
parameters {
|
||||||
stage('Test') {
|
string(
|
||||||
steps {
|
defaultValue: 'maciejczajka',
|
||||||
sh './download.sh'
|
description: 'Kaggle username',
|
||||||
}
|
name: 'KAGGLE_USERNAME',
|
||||||
|
trim: false
|
||||||
|
)
|
||||||
|
password(
|
||||||
|
defaultValue: 'd8f044ad2b96d32372e22f9054c02bb1',
|
||||||
|
description: 'Kaggle token taken from kaggle.json file, as described in https://github.com/Kaggle/kaggle-api#api-credentials',
|
||||||
|
name: 'KAGGLE_KEY'
|
||||||
|
)
|
||||||
|
string(
|
||||||
|
defaultValue: '1',
|
||||||
|
description: 'Cutoff lines',
|
||||||
|
name: 'CUTOFF'
|
||||||
|
)
|
||||||
}
|
}
|
||||||
}
|
environment {
|
||||||
|
KAGGLE_USERNAME="$params.KAGGLE_USERNAME"
|
||||||
|
KAGGLE_KEY="$params.KAGGLE_KEY"
|
||||||
|
CUTOFF="$params.CUTOFF"
|
||||||
|
}
|
||||||
|
stages {
|
||||||
|
stage('Checkout'){
|
||||||
|
steps {
|
||||||
|
checkout([$class: 'GitSCM', branches: [[name: '*/master']], extensions: [], userRemoteConfigs: [[credentialsId: 's444356', url: 'https://git.wmi.amu.edu.pl/s444356/ium_444356.git']]])
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Script'){
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
withEnv(["KAGGLE_USERNAME=${params.KAGGLE_USERNAME}",
|
||||||
|
"KAGGLE_KEY=${params.KAGGLE_KEY}" ]) {
|
||||||
|
sh 'echo KAGGLE_USERNAME: $KAGGLE_USERNAME'
|
||||||
|
sh 'kaggle datasets list'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
sh './download.sh $CUTOFF'
|
||||||
|
archiveArtifacts artifacts: 'all_games.csv.dev, all_games.csv.test, all_games.csv.train', followSymlinks: false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user