ium_444356/Jenkinsfile

47 lines
1.4 KiB
Plaintext
Raw Normal View History

2022-03-25 18:50:22 +01:00
pipeline {
agent any
2022-03-25 21:15:44 +01:00
parameters {
string(
defaultValue: 'maciejczajka',
description: 'Kaggle username',
name: 'KAGGLE_USERNAME',
trim: false
2022-03-25 18:50:22 +01:00
)
2022-03-25 21:15:44 +01:00
password(
2022-03-27 21:53:20 +02:00
defaultValue: 'd8f044ad2b96d32372e22f9054c02bb1',
2022-03-25 21:15:44 +01:00
description: 'Kaggle token taken from kaggle.json file, as described in https://github.com/Kaggle/kaggle-api#api-credentials',
name: 'KAGGLE_KEY'
)
2022-03-25 21:41:41 +01:00
string(
defaultValue: '1',
description: 'Cutoff lines',
name: 'CUTOFF'
)
2022-03-25 21:15:44 +01:00
}
environment {
KAGGLE_USERNAME="$params.KAGGLE_USERNAME"
KAGGLE_KEY="$params.KAGGLE_KEY"
2022-03-25 22:06:35 +01:00
CUTOFF="$params.CUTOFF"
2022-03-25 21:15:44 +01:00
}
stages {
2022-03-25 19:27:33 +01:00
stage('Checkout'){
steps {
checkout([$class: 'GitSCM', branches: [[name: '*/master']], extensions: [], userRemoteConfigs: [[credentialsId: 's444356', url: 'https://git.wmi.amu.edu.pl/s444356/ium_444356.git']]])
}
}
2022-03-25 20:40:44 +01:00
stage('Script'){
steps {
2022-03-25 21:15:44 +01:00
script {
withEnv(["KAGGLE_USERNAME=${params.KAGGLE_USERNAME}",
"KAGGLE_KEY=${params.KAGGLE_KEY}" ]) {
sh 'echo KAGGLE_USERNAME: $KAGGLE_USERNAME'
sh 'kaggle datasets list'
}
}
2022-03-27 15:16:07 +02:00
sh './download.sh $CUTOFF'
2022-03-25 21:26:55 +01:00
archiveArtifacts artifacts: 'all_games.csv.dev, all_games.csv.test, all_games.csv.train', followSymlinks: false
2022-03-25 20:40:44 +01:00
}
}
2022-03-25 21:15:44 +01:00
}
2022-03-25 18:50:22 +01:00
}