Data preparation and Statistics

This commit is contained in:
Michał Ulaniuk 2022-03-27 22:41:10 +02:00
parent 429ca55ab5
commit 3df5fd5858
3 changed files with 25 additions and 8 deletions

31
Jenkinsfile vendored
View File

@ -12,30 +12,45 @@ node {
defaultValue: '', defaultValue: '',
description: 'Kaggle token', description: 'Kaggle token',
name: 'KAGGLE_KEY' 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/s478831/ium_478855.git'
sh "ls -lart ./*"
sh "git branch -a"
sh "git checkout master"
}
}
}
stage('Build') { stage('Build') {
withEnv(["KAGGLE_USERNAME=${params.KAGGLE_USERNAME}", withEnv(["KAGGLE_USERNAME=${params.KAGGLE_USERNAME}",
"KAGGLE_KEY=${params.KAGGLE_KEY}" ]) { "KAGGLE_KEY=${params.KAGGLE_KEY}" ]) {
sh 'echo "BUILD"' sh 'echo "BUILD"'
sh 'echo KAGGLE_USERNAME: $KAGGLE_USERNAME' sh 'echo KAGGLE_USERNAME: $KAGGLE_USERNAME'
sh 'kaggle datasets list' //sh 'kaggle datasets list'
} }
} }
stage('Preparation') { stage('Preparation') {
withEnv(["KAGGLE_USERNAME=${params.KAGGLE_USERNAME}", sh 'echo "PREPARATION"'
"KAGGLE_KEY=${params.KAGGLE_KEY}" ]) { sh "chmod u+x ./preparation.sh"
sh 'echo "PREPARATION"' sh "KAGGLE_USERNAME=${KAGGLE_USERNAME} KAGGLE_KEY=${KAGGLE_KEY} CUTOFF=${CUTOFF} ./preparation.sh"
archiveArtifacts 'KaggleV2-May-2016.csv'
} }
} }
stage('Statistics') { stage('Statistics') {
withEnv(["KAGGLE_USERNAME=${params.KAGGLE_USERNAME}", sh "chmod u+x ./preparation.sh"
"KAGGLE_KEY=${params.KAGGLE_KEY}" ]) { sh "KAGGLE_USERNAME=${KAGGLE_USERNAME} KAGGLE_KEY=${KAGGLE_KEY} CUTOFF=${CUTOFF} ./preparation.sh"
sh 'echo "STATISTICS"' archiveArtifacts 'statistics.csv'
}
} }
} }

1
preparation.sh Normal file
View File

@ -0,0 +1 @@
echo "Preparation inner"

1
statistics.sh Normal file
View File

@ -0,0 +1 @@
wc -l KaggleV2-May-2016.csv >> statistics.csv