lab3 jenkins

This commit is contained in:
s434766 2021-03-26 16:36:45 +01:00
parent 26a55efb5a
commit 35e4c282ad
3 changed files with 54 additions and 3 deletions

32
JenkinsFile Normal file
View File

@ -0,0 +1,32 @@
pipeline {
agent any
parameters {
string (
defaultValue: '40',
description: 'Podaj ilość wierszy do odcięcia ze zbioru danych',
name: 'CUTOFF',
trim: false
)
}
stages {
stage('checkout: Check out from version control') {
steps {
git 'https://git.wmi.amu.edu.pl/s434766/ium_434766.git'
}
}
stage('sh: Shell Script') {
steps {
sh 'chmod +x script.sh'
sh './script.sh ${CUTOFF}'
}
}
stage('archiveArtifacts') {
steps {
archiveArtifacts 'scriptTest.csv'
archiveArtifacts 'scriptDev.csv'
archiveArtifacts 'scriptTrain.csv'
archiveArtifacts 'lab3.csv'
}
}
}
}

File diff suppressed because one or more lines are too long

19
script.sh Normal file
View File

@ -0,0 +1,19 @@
curl -OL https://https://git.wmi.amu.edu.pl/s434766/ium_434766/src/branch/master/healthcare-dataset-stroke-data.csv
# Podzielenie pliku csv na test/dev/train
head -n 1 healthcare-dataset-stroke-data.csv > header.csv
tail -n +2 healthcare-dataset-stroke-data.csv | shuf > healthcare.data.shuf
head -n 1022 healthcare.data.shuf > healthcare.data.test
head -n 2044 healthcare.data.shuf| tail -n 1022 > healthcare.data.dev
tail -n +3066 healthcare.data.shuf > healthcare.data.train
cat header.csv healthcare.data.test > scriptTest.csv
cat header.csv healthcare.data.dev > scriptDev.csv
cat header.csv healthcare.data.train > scriptTrain.csv
head -n $1 healthcare.data.shuf > lab3.data
cat header.csv lab3.data > lab3.csv