2023-03-28 12:20:45 +02:00
|
|
|
pipeline {
|
|
|
|
agent any
|
|
|
|
//Definijuemy parametry, ktore bedzie mozna podac podczas wywolywania zadania
|
|
|
|
parameters {
|
|
|
|
string (
|
|
|
|
name: 'INPUT_TEXT',
|
2023-03-28 12:34:55 +02:00
|
|
|
defaultValue: 'Hello World!',
|
|
|
|
description: 'Tekst, ktorym chcesz przywitac swiat',
|
2023-03-28 12:20:45 +02:00
|
|
|
trim: false
|
|
|
|
)
|
|
|
|
}
|
|
|
|
stages {
|
2023-03-28 12:44:56 +02:00
|
|
|
stage('Run Script') {
|
2023-03-28 12:55:12 +02:00
|
|
|
steps {
|
2023-03-28 13:08:50 +02:00
|
|
|
script {
|
2023-03-28 12:55:12 +02:00
|
|
|
sh "chmod +x -R ${env.WORKSPACE}"
|
2023-03-28 13:14:18 +02:00
|
|
|
sh './take_data.sh | tee output.txt'
|
2023-03-28 13:08:50 +02:00
|
|
|
}
|
2023-03-28 12:43:16 +02:00
|
|
|
}
|
2023-03-28 12:44:56 +02:00
|
|
|
|
2023-03-28 12:43:16 +02:00
|
|
|
}
|
2023-03-28 12:20:45 +02:00
|
|
|
stage('Goodbye!') {
|
|
|
|
steps {
|
|
|
|
echo 'Goodbye!'
|
|
|
|
//Zarchiwizuj wynik
|
|
|
|
archiveArtifacts 'output.txt'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|