From 857737913b3a79396723bb1180b3b706490e238e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patryk=20Ga=C5=82ka?= Date: Wed, 19 Apr 2023 18:06:23 +0200 Subject: [PATCH] Update 'Jenkinsfile_dataset_stats' --- Jenkinsfile_dataset_stats | 36 ++++++++++++++---------------------- 1 file changed, 14 insertions(+), 22 deletions(-) diff --git a/Jenkinsfile_dataset_stats b/Jenkinsfile_dataset_stats index 24c9c97..a81096c 100644 --- a/Jenkinsfile_dataset_stats +++ b/Jenkinsfile_dataset_stats @@ -1,22 +1,19 @@ pipeline { agent any - //Definijuemy parametry, które będzie można podać podczas wywoływania zadania - parameters{ - choice( - choices: ['lastSuccessful()', 'lastCompleted()', 'latestSavedBuild()'], - description: 'Which build to use for copying artifacts', - name: 'BUILD_SELECTOR' - )} + parameters{ + choice( + choices: ['lastSuccessful()', 'lastCompleted()', 'latestSavedBuild()'], + description: 'Which build to use for copying artifacts', + name: 'BUILD_SELECTOR' + )} stages { - stage('clear_all') { + stage('clear_before') { steps { - //Wypisz wartość parametru w konsoli (To nie jest polecenie bash, tylko groovy!) - sh 'rm -rf ium_z434686' + sh 'rm -rf *' } } - stage('checkout') { + stage('clone_git') { steps { - //Wypisz wartość parametru w konsoli (To nie jest polecenie bash, tylko groovy!) sh 'git clone https://git.wmi.amu.edu.pl/s434686/ium_z434686' } } @@ -34,20 +31,15 @@ pipeline { } } steps { - sh 'ls -a' sh 'python ./ium_z434686/dataset-stats.py' - echo 'koniec' - archiveArtifacts 'X_test.csv' - archiveArtifacts 'X_dev.csv' - archiveArtifacts 'X_train.csv' + archiveArtifacts 'X_test_stats.csv' + archiveArtifacts 'X_dev_stats.csv' + archiveArtifacts 'X_train_stats.csv' } } - stage('Goodbye!') { + stage('clear_after!') { steps { - echo 'Goodbye!' - //Zarchiwizuj wynik - archiveArtifacts 'dataset.csv' - + sh 'rm -rf *' } } }