diff --git a/Jenkinsfile b/Jenkinsfile index a29727f..678883c 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -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 } diff --git a/Jenkinsfile-stats b/Jenkinsfile-stats new file mode 100644 index 0000000..2a01e1b --- /dev/null +++ b/Jenkinsfile-stats @@ -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 + } + } + } \ No newline at end of file diff --git a/script2.sh b/script2.sh new file mode 100644 index 0000000..2d59b33 --- /dev/null +++ b/script2.sh @@ -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/ \ No newline at end of file