This commit is contained in:
s434695 2021-03-28 21:02:12 +02:00
parent 23c1233a04
commit b43e9ce3f0
2 changed files with 18 additions and 12 deletions

15
Jenkinsfile vendored
View File

@ -10,24 +10,15 @@ pipeline {
)
}
stages {
stage('Hello') {
steps {
//Wypisz wartość parametru w konsoli (To nie jest polecenie bash, tylko groovy!)
echo "INPUT_TEXT: ${INPUT_TEXT}"
//Wywołaj w konsoli komendę "figlet", która generuje ASCI-art
sh "figlet \"${INPUT_TEXT}\" | tee output.txt"
}
}
stage('checkout: Check out from version control') {
steps {
git credentialsId: 'f746c8e0-e974-4758-838d-1920a7b0e3dc', url: 'https://git.wmi.amu.edu.pl/s434695/ium_434695.git'
}
}
stage('Goodbye!') {
stage('sh: Shell Script') {
steps {
echo 'Goodbye!'
//Zarchiwizuj wynik
archiveArtifacts 'output.txt'
sh 'chmod +x skrypt.sh'
sh './skrypt.sh ${CUTOFF}'
}
}
}

15
skrypt.sh Normal file
View File

@ -0,0 +1,15 @@
#(Pobranie pliku .csv)
curl -OL https://git.wmi.amu.edu.pl/s434695/ium_434695/raw/branch/master/vgsales.csv
#(Podzielenie pliku csv na test/dev/train)
head -n 1 vgsales.csv > header.csv
tail -n +2 vgsales.csv | shuf > data.shuffled
head -n 266 data.shuffled > games.data.test
head -n 532 data.shuffled | tail -n 266 > games.data.dev
tail -n +333 data.shuffled > games.data.train
cat header.csv games.data.test > test.csv
cat header.csv games.data.dev > dev.csv
cat header.csv games.data.train > train.csv