From 61752172bc6551a6353f492da92f85f76dd2c01e Mon Sep 17 00:00:00 2001 From: Andrzej Preibisz Date: Mon, 21 Mar 2022 11:05:30 +0100 Subject: [PATCH] Added Jenkinsfile --- Jenkinsfile | 25 +++++++++++++++++++++++++ main.py | 2 ++ 2 files changed, 27 insertions(+) create mode 100644 Jenkinsfile diff --git a/Jenkinsfile b/Jenkinsfile new file mode 100644 index 0000000..acef5e1 --- /dev/null +++ b/Jenkinsfile @@ -0,0 +1,25 @@ +node { + stage('Preparation') { + properties([ + parameters([ + string( + defaultValue: 'Hello World!', + description: 'Tekst do wyświetlenie', + name: 'INPUT_TEXT', + trim: false + ) + ]) + ]) + } + 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('Goodbye') { + echo 'Goodbye!' + //Zarchiwizuj wynik + archiveArtifacts 'output.txt' + } +} \ No newline at end of file diff --git a/main.py b/main.py index eb54d1c..d278f9b 100644 --- a/main.py +++ b/main.py @@ -27,7 +27,9 @@ print("Odchylenie standardowe BMI - łącznie:", dataset["BMI"].std()) print("Mediana BMI:", dataset_test["BMI"].median()) max_bmi = dataset_train["BMI"].max() + print(max_bmi) dataset_train["BMI"] = dataset_train["BMI"].apply(lambda x: x/max_bmi) dataset_test["BMI"] = dataset_test["BMI"].apply(lambda x: x/max_bmi) +print(dataset_train["AgeCategory"].value_counts()) print(dataset_train["BMI"])