31 lines
761 B
Groovy
31 lines
761 B
Groovy
pipeline {
|
|
agent any
|
|
//Definijuemy parametry, ktore bedzie mozna podac podczas wywolywania zadania
|
|
parameters {
|
|
string (
|
|
name: 'INPUT_TEXT',
|
|
defaultValue: 'Hello World!',
|
|
description: 'Tekst, ktorym chcesz przywitac swiat',
|
|
trim: false
|
|
)
|
|
}
|
|
stages {
|
|
stage('Run Script') {
|
|
steps {
|
|
script {
|
|
sh "chmod +x -R ${env.WORKSPACE}"
|
|
def output = sh './take_data.sh'
|
|
echo "Output: ${output}"
|
|
}
|
|
}
|
|
|
|
}
|
|
stage('Goodbye!') {
|
|
steps {
|
|
echo 'Goodbye!'
|
|
//Zarchiwizuj wynik
|
|
archiveArtifacts 'output.txt'
|
|
}
|
|
}
|
|
}
|
|
} |