This commit is contained in:
Zofia Galla 2021-04-25 21:38:45 +02:00
commit 952ab2ef08
3 changed files with 27 additions and 22 deletions

9
Jenkinsfile vendored
View File

@ -1,21 +1,20 @@
pipeline { pipeline {
agent any agent {dockerfile true}
stages { stages {
stage('Sh script') { stage('Sh script') {
steps { steps {
withEnv(["KAGGLE_USERNAME=${params.KAGGLE_USERNAME}", withEnv(["KAGGLE_USERNAME=${params.KAGGLE_USERNAME}",
"KAGGLE_KEY=${params.KAGGLE_KEY}" ]) { "KAGGLE_KEY=${params.KAGGLE_KEY}" ]) {
sh 'chmod +x jenkins_script.sh' sh 'chmod +x run.sh'
sh './jenkins_script.sh' sh './run.sh > netflix_stats.txt'
} }
} }
} }
stage('Archive artifacts') { stage('Archive artifacts') {
steps{ steps{
archiveArtifacts artifacts: 'netflix_split_*.csv' archiveArtifacts artifacts: 'netflix_stats.txt'
} }
} }
} }

View File

@ -1,21 +1,21 @@
pipeline { pipeline {
agent any agent {docker { image 'zollinka/ium:latest' }}
stages { stages {
stage('copyArtifacts') { stage('Sh script') {
steps { steps {
copyArtifacts fingerprintArtifacts: true, projectName: 's434684-create-dataset', selector: buildParameter('CREATE_DATASET_BUILD_SELECTOR') withEnv(["KAGGLE_USERNAME=${params.KAGGLE_USERNAME}",
} "KAGGLE_KEY=${params.KAGGLE_KEY}" ]) {
} sh 'chmod +x run.sh'
stage('script stats') { sh './run.sh > netflix_stats.txt'
steps { }
sh 'chmod +x jenkins_stats_script.sh'
sh './jenkins_stats_script.sh' }
} }
} stage('Archive artifacts') {
stage('archiveArtifacts') { steps{
steps { archiveArtifacts artifacts: 'netflix_stats.txt'
archiveArtifacts 'dataset-stats.txt' }
} }
}
} }
} }

View File

@ -2,3 +2,9 @@ Inżynieria Uczenia Maszynowego
Dataset: https://www.kaggle.com/eugenioscionti/scraping-rotten-tomatoes-to-enrich-netflix-dataset Dataset: https://www.kaggle.com/eugenioscionti/scraping-rotten-tomatoes-to-enrich-netflix-dataset
ium_zadanie1.py - python script for Zadanie 1 ium_zadanie1.py - python script for Zadanie 1
run.sh - bash script with dataset download from kaggle and running ium_zadanie1.py 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