ium_478855/Jenkinsfile

54 lines
1.5 KiB
Plaintext
Raw Normal View History

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:50:50 +02:00
stage('Checkout') {
steps {
2022-03-27 22:58:00 +02:00
checkout([$class: 'GitSCM', branches: [[name: '*/master']],
userRemoteConfigs: [[url: 'https://git.wmi.amu.edu.pl/s478855/ium_478855.git']]])
2022-03-27 22:50:50 +02:00
}
}
2022-03-27 22:46:28 +02:00
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
2022-03-27 22:50:50 +02:00
stage('Data 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
}