tweak(UMA_03) Update Jenkinsfile
This commit is contained in:
parent
a158d62eca
commit
e5f113f92f
35
Jenkinsfile
vendored
35
Jenkinsfile
vendored
@ -1,28 +1,27 @@
|
|||||||
pipeline{
|
pipeline{
|
||||||
agent any
|
agent any
|
||||||
//Definijuemy parametry, które będzie można podać podczas wywoływania zadania
|
properties([parameters([text(defaultValue: '50', description: 'Number of lines to cutoff', name: 'CUTOFF')])])
|
||||||
parameters {
|
|
||||||
string (
|
|
||||||
defaultValue: 'Hello World!',
|
|
||||||
description: 'Tekst, którym chcesz przywitać świat',
|
|
||||||
name: 'INPUT_TEXT',
|
|
||||||
trim: false
|
|
||||||
)
|
|
||||||
}
|
|
||||||
stages{
|
stages{
|
||||||
stage('Hello') {
|
stage('Stage 1'){
|
||||||
steps{
|
steps{
|
||||||
//Wypisz wartość parametru w konsoli (To nie jest polecenie bash, tylko groovy!)
|
echo 'Hello World!'
|
||||||
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!') {
|
stage('checkout: Check out from version control'){
|
||||||
steps{
|
steps{
|
||||||
echo 'Goodbye!'
|
checkout([$class: 'GitSCM', branches: [[name: '*/master']], doGenerateSubmoduleConfigurations: false, extensions: [], submoduleCfg: [], userRemoteConfigs: [[credentialsId: '321737ab-1c4d-475f-9667-513cf19ba596', url: 'https://git.wmi.amu.edu.pl/s434780/ium_434780.git']]])
|
||||||
//Zarchiwizuj wynik
|
}
|
||||||
archiveArtifacts 'output.txt'
|
}
|
||||||
|
stage('sh: Shell Script'){
|
||||||
|
steps{
|
||||||
|
./script.sh
|
||||||
|
}
|
||||||
|
}
|
||||||
|
stage('Archive artifacts'){
|
||||||
|
steps{
|
||||||
|
archiveArtifacts 'test.csv'
|
||||||
|
archiveArtifacts 'dev.csv'
|
||||||
|
archiveArtifacts 'train.csv'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user