This commit is contained in:
Szymon Bartanowicz 2024-03-26 19:54:59 +01:00
parent a668fc86b0
commit d9a67725ae
3 changed files with 43 additions and 2 deletions

4
Jenkinsfile vendored
View File

@ -14,7 +14,7 @@ pipeline {
}
}
stage('Pobierz i przeprocesuj zbiór') {
stage('Download and preprocess') {
environment {
KAGGLE_USERNAME = "szymonbartanowicz"
KAGGLE_KEY = "4692239eb65f20ec79f9a59ef30e67eb"
@ -28,7 +28,7 @@ pipeline {
}
}
}
stage('Archiwizuj') {
stage('Archive') {
steps {
archiveArtifacts artifacts: 'data/*', onlyIfSuccessful: true
}

32
Jenkinsfile-stats Normal file
View File

@ -0,0 +1,32 @@
pipeline {
agent any
parameters {
buildSelector( defaultSelector: lastSuccessful(), description: 'Which build to use for copying artifacts', name: 'BUILD_SELECTOR')
}
stages {
stage('Clone Repository') {
steps {
git branch: "main", url: "https://git.wmi.amu.edu.pl/s464937/ium_464937"
}
}
stage('Copy Artifact') {
steps {
withEnv(["BUILD_SELECTOR=${params.BUILD_SELECTOR}" ]) {
copyArtifacts fingerprintArtifacts: true, projectName: 'z-s464937-create-dataset', selector: buildParameter('$BUILD_SELECTOR')}
}
}
stage('Print stats') {
steps {
script {
sh "bash ./script2.sh"
}
}
}
stage('Archive Results') {
steps {
archiveArtifacts artifacts: 'data/*', onlyIfSuccessful: true
}
}
}

9
script2.sh Normal file
View File

@ -0,0 +1,9 @@
#!/bin/bash
echo "Liczba linijek dla train"
wc -l data/train.csv > stats_train.txt
echo "Liczba linijek dla dev"
wc -l data/dev.csv > stats_dev.txt
echo "Liczba linijek dla test"
wc -l data/test.csv > stats_test.txt
mkdir -p data
mv stats_train.txt stats_dev.txt stats_test.txt data/