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 { 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') { stage('checkout: Check out from version control') {
steps { steps {
git credentialsId: 'f746c8e0-e974-4758-838d-1920a7b0e3dc', url: 'https://git.wmi.amu.edu.pl/s434695/ium_434695.git' 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 { steps {
echo 'Goodbye!' sh 'chmod +x skrypt.sh'
//Zarchiwizuj wynik sh './skrypt.sh ${CUTOFF}'
archiveArtifacts 'output.txt'
} }
} }
} }

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