ium_434788/Jenkinsfile
2021-03-25 13:48:00 +01:00

47 lines
1.3 KiB
Groovy

pipeline {
agent any
//Definijuemy parametry, które będzie można podać podczas wywoływania zadania
parameters {
string (
defaultValue: '500',
description: 'Podaj ilość wierszy do odcięcia od zbioru danych',
name: 'CUTOFF',
trim: false
)
}
stages {
stage('checkout: Check out from version control') {
steps {
git 'https://git.wmi.amu.edu.pl/s434788/ium_434788'
}
}
stage('sh: Shell Script') {
steps {
sh 'chmod +x test.sh'
sh './test.sh ${CUTOFF}'
}
}
stage('archiveArtifacts') {
steps {
archiveArtifacts 'test.csv'
archiveArtifacts 'dev.csv'
archiveArtifacts 'train.csv'
}
}
stage('Hello') {
steps {
//Wypisz wartość parametru w konsoli (To nie jest polecenie bash, tylko groovy!)
echo "INPUT_TEXT: ${CUTOFF}"
//Wywołaj w konsoli komendę "figlet", która generuje ASCI-art
sh "figlet \"${CUTOFF}\" | tee output.txt"
}
}
stage('Goodbye!') {
steps {
echo 'Goodbye!'
//Zarchiwizuj wynik
archiveArtifacts 'output.txt'
}
}
}
}