Jenkinsfile + script fixes
This commit is contained in:
parent
84eea01ea3
commit
76e3ced286
14
Jenkinsfile
vendored
14
Jenkinsfile
vendored
@ -7,19 +7,21 @@ node {
|
||||
description: 'Tekst do wyświetlenie',
|
||||
name: 'INPUT_TEXT',
|
||||
trim: false
|
||||
),
|
||||
string(
|
||||
defaultValue: "10000",
|
||||
description: "How many records use",
|
||||
name: "CUTOFF"
|
||||
)
|
||||
])
|
||||
])
|
||||
}
|
||||
stage('Hello') {
|
||||
//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('Download') {
|
||||
sh "dataset_script.sh \"${CUTOFF}\""
|
||||
}
|
||||
stage('Goodbye') {
|
||||
echo 'Goodbye!'
|
||||
//Zarchiwizuj wynik
|
||||
archiveArtifacts 'output.txt'
|
||||
archiveArtifacts 'heart_2020_test.csv, heart_2020_train.csv, heart_2020_sorted.csv'
|
||||
}
|
||||
}
|
@ -1,3 +1,11 @@
|
||||
#!/bin/bash
|
||||
CUTOFF=$1
|
||||
|
||||
TEST_SIZE=$(($CUTOFF * 1/5))
|
||||
TRAIN_START=$(($TEST_SIZE+1))
|
||||
echo $TEST_SIZE
|
||||
echo $TRAIN_START
|
||||
|
||||
! kaggle datasets download kamilpytlak/personal-key-indicators-of-heart-disease
|
||||
! unzip personal-key-indicators-of-heart-disease -d ./
|
||||
! wc -l heart_2020_cleaned.csv
|
||||
@ -9,10 +17,10 @@ echo "Categories: \n"
|
||||
|
||||
|
||||
! grep -P "^$" -n heart_2020_cleaned.csv
|
||||
! head -n -1 heart_2020_cleaned.csv | shuf > heart_2020_sorted.csv
|
||||
! head -n $CUTOFF heart_2020_cleaned.csv | shuf > heart_2020_sorted.csv
|
||||
|
||||
! head -n 4000 heart_2020_sorted.csv > heart_2020_test.csv
|
||||
! tail -n +4001 heart_2020_sorted.csv > heart_2020_train.csv
|
||||
! head -n $TEST_SIZE heart_2020_sorted.csv > heart_2020_test.csv
|
||||
! tail -n +$TRAIN_START heart_2020_sorted.csv > heart_2020_train.csv
|
||||
|
||||
! wc -l heart_2020_t*
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user