2021-03-25 11:49:11 +01:00
|
|
|
pipeline {
|
|
|
|
agent any
|
|
|
|
//Definijuemy parametry, które będzie można podać podczas wywoływania zadania
|
|
|
|
parameters {
|
|
|
|
string (
|
2021-03-25 12:47:03 +01:00
|
|
|
defaultValue: '500',
|
|
|
|
description: 'Podaj ilość wierszy do odcięcia od zbioru danych',
|
|
|
|
name: 'CUTOFF',
|
2021-03-25 11:49:11 +01:00
|
|
|
trim: false
|
|
|
|
)
|
|
|
|
}
|
|
|
|
stages {
|
2021-03-25 12:26:18 +01:00
|
|
|
stage('Clone_Repo') {
|
|
|
|
steps {
|
|
|
|
// Get some code from a GitHub repository
|
|
|
|
git 'https://git.wmi.amu.edu.pl/s434788/ium_434788'
|
2021-03-25 12:30:07 +01:00
|
|
|
}
|
2021-03-25 12:31:40 +01:00
|
|
|
}
|
2021-03-25 12:26:18 +01:00
|
|
|
stage('Run shell script') {
|
2021-03-25 12:31:40 +01:00
|
|
|
steps {
|
2021-03-25 12:38:00 +01:00
|
|
|
sh 'chmod +x test.sh'
|
2021-03-25 12:28:31 +01:00
|
|
|
sh './test.sh'
|
2021-03-25 13:17:46 +01:00
|
|
|
archiveArtifacts 'test.csv'
|
|
|
|
archiveArtifacts 'dev.csv'
|
2021-03-25 12:26:18 +01:00
|
|
|
archiveArtifacts 'train.csv'
|
2021-03-25 12:31:40 +01:00
|
|
|
}
|
2021-03-25 12:26:18 +01:00
|
|
|
}
|
2021-03-25 11:49:11 +01:00
|
|
|
stage('Hello') {
|
|
|
|
steps {
|
|
|
|
//Wypisz wartość parametru w konsoli (To nie jest polecenie bash, tylko groovy!)
|
2021-03-25 12:49:10 +01:00
|
|
|
echo "INPUT_TEXT: ${CUTOFF}"
|
2021-03-25 11:49:11 +01:00
|
|
|
//Wywołaj w konsoli komendę "figlet", która generuje ASCI-art
|
2021-03-25 12:49:10 +01:00
|
|
|
sh "figlet \"${CUTOFF}\" | tee output.txt"
|
2021-03-25 11:49:11 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
stage('Goodbye!') {
|
|
|
|
steps {
|
|
|
|
echo 'Goodbye!'
|
|
|
|
//Zarchiwizuj wynik
|
|
|
|
archiveArtifacts 'output.txt'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|