From 7bc522b6c9ee054852480cc08cc28c61c860413b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wojciech=20Miko=C5=82ajski?= Date: Fri, 21 Apr 2023 08:23:45 +0200 Subject: [PATCH] Add 'Jenkinsfile-stats-Docker' --- Jenkinsfile-stats-Docker | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 Jenkinsfile-stats-Docker diff --git a/Jenkinsfile-stats-Docker b/Jenkinsfile-stats-Docker new file mode 100644 index 0000000..b39237c --- /dev/null +++ b/Jenkinsfile-stats-Docker @@ -0,0 +1,27 @@ +node { +stage('Preparation') { + properties([ + parameters([ + buildSelector( + defaultSelector: lastSuccessful(), + description: 'Which build to use for copying artifacts', + name: 'BUILD_SELECTOR') + ]) + ]) + } + stage('checkout: Check out from version control') { + checkout scm + } + stage('Copy Artifacts') { + copyArtifacts fingerprintArtifacts: true, projectName: 's487182-create-dataset', selector: buildParameter('BUILD_SELECTOR') + archiveArtifacts artifacts: 'waterQuality.csv, output.txt' + } + + stage('sh: Shell Script') { + sh 'python3 dataset_stats.py > output.txt' + archiveArtifacts artifacts: 'output.txt' + } + stage('Run command in Docker container') { + sh "docker run -v app/body_performance_processed.csv wujt89/ium:1 python3 ./create_dataset.py > output.txt" + } +} \ No newline at end of file