diff --git a/Jenkinsfile b/Jenkinsfile index 8dac578..5477308 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,21 +1,20 @@ pipeline { - agent any - + agent {dockerfile true} stages { stage('Sh script') { steps { withEnv(["KAGGLE_USERNAME=${params.KAGGLE_USERNAME}", "KAGGLE_KEY=${params.KAGGLE_KEY}" ]) { - sh 'chmod +x jenkins_script.sh' - sh './jenkins_script.sh' + sh 'chmod +x run.sh' + sh './run.sh > netflix_stats.txt' } } } stage('Archive artifacts') { steps{ - archiveArtifacts artifacts: 'netflix_split_*.csv' + archiveArtifacts artifacts: 'netflix_stats.txt' } } } diff --git a/Jenkinsfile_stats b/Jenkinsfile_stats index 0cac29d..c3c8b86 100644 --- a/Jenkinsfile_stats +++ b/Jenkinsfile_stats @@ -1,21 +1,21 @@ pipeline { - agent any + agent {docker { image 'zollinka/ium:latest' }} + stages { - stage('copyArtifacts') { - steps { - copyArtifacts fingerprintArtifacts: true, projectName: 's434684-create-dataset', selector: buildParameter('CREATE_DATASET_BUILD_SELECTOR') - } - } - stage('script stats') { - steps { - sh 'chmod +x jenkins_stats_script.sh' - sh './jenkins_stats_script.sh' - } - } - stage('archiveArtifacts') { - steps { - archiveArtifacts 'dataset-stats.txt' - } - } + stage('Sh script') { + steps { + withEnv(["KAGGLE_USERNAME=${params.KAGGLE_USERNAME}", + "KAGGLE_KEY=${params.KAGGLE_KEY}" ]) { + sh 'chmod +x run.sh' + sh './run.sh > netflix_stats.txt' + } + + } + } + stage('Archive artifacts') { + steps{ + archiveArtifacts artifacts: 'netflix_stats.txt' + } + } } } \ No newline at end of file diff --git a/README.md b/README.md index 9a61f48..4d2057c 100644 --- a/README.md +++ b/README.md @@ -2,3 +2,9 @@ Inżynieria Uczenia Maszynowego Dataset: https://www.kaggle.com/eugenioscionti/scraping-rotten-tomatoes-to-enrich-netflix-dataset ium_zadanie1.py - python script for Zadanie 1 run.sh - bash script with dataset download from kaggle and running ium_zadanie1.py + +Jenkinsfile - Jenkinsfile for classes 3 - create-Dataset +Jenkinsfile-stats - Jenkinsfile for classes 3 - dataset-stats + +Dockerfile - Dockerfile for classes 4 +