diff --git a/Jenkinsfile b/Jenkinsfile index 491d1a7..c3bd96f 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,25 +1,23 @@ -pipeline { - agent any - parameters { - string ( - defaultValue: 'Witaj świecie!', - description: 'Tekst, którym chcesz przywitać świat', - name: 'INPUT_TEXT', - trim: false - ) - } - stages { - stage('Hello') { - steps { - echo "INPUT_TEXT: ${INPUT_TEXT}" - sh "figlet \"${INPUT_TEXT}\" | tee output.txt" - } - } - stage('Goodbye!') { - steps { - echo 'Goodbye!' - archiveArtifacts 'output.txt' - } - } - } +pipeline{ + agent any + properties([parameters([text(defaultValue: '50', description: 'Number of lines to cutoff', name: 'CUTOFF')])]) + stages{ + stage('checkout: Check out from version control'){ + steps{ + git url: 'https://git.wmi.amu.edu.pl/s434780/ium_434780' + } + } + stage('sh: Shell Script'){ + steps{ + ./script.sh + } + } + stage('Archive artifacts'){ + steps{ + archiveArtifacts 'test.csv' + archiveArtifacts 'dev.csv' + archiveArtifacts 'train.csv' + } + } + } } \ No newline at end of file diff --git a/script.sh b/script.sh new file mode 100644 index 0000000..6575c75 --- /dev/null +++ b/script.sh @@ -0,0 +1,8 @@ +#!/bin/bash +curl -OL https://git.wmi.amu.edu.pl/s434780/ium_434780/src/branch/master/resources/Amazon_Consumer_Reviews.csv +head -n -1 Amazon_Consumer_Reviews.csv | shuf > Amazon_Consumer_Reviews.csv.shuf +wc -l Amazon_Consumer_Reviews.csv +head -n 500 Amazon_Consumer_Reviews.csv.shuf > test.csv +head -n 500 Amazon_Consumer_Reviews.csv.shuf | tail -n 2006 > dev.csv +tail -n +501 Amazon_Consumer_Reviews.csv.shuf > train.csv +wc -l *.csv \ No newline at end of file