Compare commits

..

2 Commits

Author SHA1 Message Date
Piotr Pawlak
5ebaf838ca add Jenkinsfile 2023-03-25 13:45:08 +01:00
Piotr Pawlak
53e081c07f add Jenkinsfile 2023-03-25 13:44:12 +01:00
2 changed files with 41 additions and 18 deletions

View File

@ -3,7 +3,7 @@
{
"cell_type": "code",
"execution_count": 1,
"id": "59868c88",
"id": "7fada8a6",
"metadata": {},
"outputs": [
{
@ -31,7 +31,7 @@
{
"cell_type": "code",
"execution_count": 2,
"id": "776bf1e2",
"id": "3d3dc9c4",
"metadata": {},
"outputs": [
{
@ -49,7 +49,7 @@
{
"cell_type": "code",
"execution_count": 3,
"id": "a56dee9c",
"id": "e4e1c9c4",
"metadata": {},
"outputs": [
{
@ -75,34 +75,28 @@
},
{
"cell_type": "code",
"execution_count": 9,
"id": "54a43eaa",
"execution_count": 11,
"id": "198bb7b6",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
" 192 high\n",
" 193 low\n",
" 192 med\n",
" 96 high\n",
" 96 low\n",
" 96 med\n",
" 96 high\n",
" 96 low\n",
" 96 med\n"
" 1728 car.data\r\n",
" 288 car.data.dev\r\n",
" 288 car.data.test\r\n",
" 1152 car.data.train\r\n",
" 3456 total\r\n"
]
}
],
"source": [
"!head -n 288 car.data > car.data.test\n",
"!head -n 576 car.data | tail -n 288 > car.data.dev\n",
"!head -n +577 car.data > car.data.train\n",
"!tail -n +577 car.data > car.data.train\n",
"#sprawdzanie podziału ze względu na bezpieczeństwo samochodu\n",
"!cut -f 6 -d \",\" car.data.train | sort | uniq -c\n",
"!cut -f 6 -d \",\" car.data.test | sort | uniq -c\n",
"!cut -f 6 -d \",\" car.data.dev | sort | uniq -c"
"!wc -l car.data*"
]
}
],

29
Jenkinsfile vendored Normal file
View File

@ -0,0 +1,29 @@
pipeline {
agent any
//Definijuemy parametry, które będzie można podać podczas wywoływania zadania
parameters {
string (
defaultValue: 'Hello World!',
description: 'Tekst, którym chcesz przywitać świat',
name: 'INPUT_TEXT',
trim: false
)
}
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('Goodbye!') {
steps {
echo 'Goodbye!'
//Zarchiwizuj wynik
archiveArtifacts 'output.txt'
}
}
}
}