2022-03-27 21:55:50 +02:00
|
|
|
node {
|
|
|
|
stage('Preparation') {
|
|
|
|
properties([
|
|
|
|
parameters([
|
|
|
|
string(
|
|
|
|
defaultValue: 'h7557h',
|
|
|
|
description: 'Kaggle username',
|
|
|
|
name: 'KAGGLE_USERNAME',
|
|
|
|
trim: false
|
|
|
|
),
|
|
|
|
password(
|
2022-03-27 22:04:39 +02:00
|
|
|
defaultValue: '',
|
2022-03-27 21:55:50 +02:00
|
|
|
description: 'Kaggle token',
|
|
|
|
name: 'KAGGLE_KEY'
|
2022-03-27 22:41:10 +02:00
|
|
|
),
|
|
|
|
string(
|
|
|
|
defaultValue: '10',
|
|
|
|
description: 'Cutoff',
|
|
|
|
name: 'CUTOFF'
|
2022-03-27 21:55:50 +02:00
|
|
|
)
|
|
|
|
])
|
|
|
|
])
|
|
|
|
}
|
2022-03-27 22:41:10 +02:00
|
|
|
stage('Checkout') {
|
|
|
|
steps {
|
|
|
|
script {
|
|
|
|
git credentialsId: 'jenkins-user-github', url: 'https://git.wmi.amu.edu.pl/s478831/ium_478855.git'
|
|
|
|
sh "ls -lart ./*"
|
|
|
|
sh "git branch -a"
|
|
|
|
sh "git checkout master"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2022-03-27 21:55:50 +02:00
|
|
|
stage('Build') {
|
|
|
|
withEnv(["KAGGLE_USERNAME=${params.KAGGLE_USERNAME}",
|
|
|
|
"KAGGLE_KEY=${params.KAGGLE_KEY}" ]) {
|
2022-03-27 22:07:02 +02:00
|
|
|
sh 'echo "BUILD"'
|
2022-03-27 21:55:50 +02:00
|
|
|
sh 'echo KAGGLE_USERNAME: $KAGGLE_USERNAME'
|
2022-03-27 22:41:10 +02:00
|
|
|
//sh 'kaggle datasets list'
|
2022-03-27 21:55:50 +02:00
|
|
|
}
|
|
|
|
}
|
2022-03-27 22:07:02 +02:00
|
|
|
|
|
|
|
stage('Preparation') {
|
2022-03-27 22:41:10 +02:00
|
|
|
sh 'echo "PREPARATION"'
|
|
|
|
sh "chmod u+x ./preparation.sh"
|
|
|
|
sh "KAGGLE_USERNAME=${KAGGLE_USERNAME} KAGGLE_KEY=${KAGGLE_KEY} CUTOFF=${CUTOFF} ./preparation.sh"
|
|
|
|
archiveArtifacts 'KaggleV2-May-2016.csv'
|
2022-03-27 22:07:02 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
stage('Statistics') {
|
2022-03-27 22:41:10 +02:00
|
|
|
sh "chmod u+x ./preparation.sh"
|
|
|
|
sh "KAGGLE_USERNAME=${KAGGLE_USERNAME} KAGGLE_KEY=${KAGGLE_KEY} CUTOFF=${CUTOFF} ./preparation.sh"
|
|
|
|
archiveArtifacts 'statistics.csv'
|
2022-03-27 22:07:02 +02:00
|
|
|
}
|
2022-03-27 21:55:50 +02:00
|
|
|
}
|