ium_444356/Jenkinsfile

49 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(
defaultValue: '',
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 19:27:33 +01:00
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-25 20:40:44 +01:00
sh './download.sh'
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 21:42:59 +01:00
sh 'head -n $CUTOFF all_games.csv.train'
2022-03-25 20:40:44 +01:00
}
}
2022-03-25 21:15:44 +01:00
}
2022-03-25 18:50:22 +01:00
}