ium_478855/Jenkinsfile
Michał Ulaniuk 3ade3d7ff0 Fix
2022-03-27 22:50:50 +02:00

58 lines
1.6 KiB
Groovy

node {
stage('Preparation') {
properties([
parameters([
string(
defaultValue: 'h7557h',
description: 'Kaggle username',
name: 'KAGGLE_USERNAME',
trim: false
),
password(
defaultValue: '',
description: 'Kaggle token',
name: 'KAGGLE_KEY'
),
string(
defaultValue: '10',
description: 'Cutoff',
name: 'CUTOFF'
)
])
])
}
stage('Checkout') {
steps {
script {
git credentialsId: 'jenkins-user-github', url: 'https://git.wmi.amu.edu.pl/s478855/ium_478855.git'
sh "ls -lart ./*"
sh "git branch -a"
sh "git checkout master"
}
}
}
stage('Build') {
withEnv(["KAGGLE_USERNAME=${params.KAGGLE_USERNAME}",
"KAGGLE_KEY=${params.KAGGLE_KEY}" ]) {
sh 'echo "BUILD"'
sh 'echo KAGGLE_USERNAME: $KAGGLE_USERNAME'
//sh 'kaggle datasets list'
}
}
stage('Data Preparation') {
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'
}
stage('Statistics') {
sh "chmod u+x ./preparation.sh"
sh "KAGGLE_USERNAME=${KAGGLE_USERNAME} KAGGLE_KEY=${KAGGLE_KEY} CUTOFF=${CUTOFF} ./preparation.sh"
archiveArtifacts 'statistics.csv'
}
}