tweak(UMA_03) Update Jenkinsfile and create script.sh

This commit is contained in:
sadurska@trui.pl 2021-04-19 14:14:54 +02:00
parent 5484926efc
commit a8873f1e63
2 changed files with 30 additions and 24 deletions

46
Jenkinsfile vendored
View File

@ -1,25 +1,23 @@
pipeline { pipeline{
agent any agent any
parameters { properties([parameters([text(defaultValue: '50', description: 'Number of lines to cutoff', name: 'CUTOFF')])])
string ( stages{
defaultValue: 'Witaj świecie!', stage('checkout: Check out from version control'){
description: 'Tekst, którym chcesz przywitać świat', steps{
name: 'INPUT_TEXT', git url: 'https://git.wmi.amu.edu.pl/s434780/ium_434780'
trim: false }
) }
} stage('sh: Shell Script'){
stages { steps{
stage('Hello') { ./script.sh
steps { }
echo "INPUT_TEXT: ${INPUT_TEXT}" }
sh "figlet \"${INPUT_TEXT}\" | tee output.txt" stage('Archive artifacts'){
} steps{
} archiveArtifacts 'test.csv'
stage('Goodbye!') { archiveArtifacts 'dev.csv'
steps { archiveArtifacts 'train.csv'
echo 'Goodbye!' }
archiveArtifacts 'output.txt' }
} }
}
}
} }

8
script.sh Normal file
View File

@ -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