From 128d212ef50cdcd33e57f2b8021bd388891fc3c6 Mon Sep 17 00:00:00 2001 From: Jakub Henyk Date: Tue, 28 Mar 2023 13:31:04 +0200 Subject: [PATCH] Addded Jenkinsfile_2 ad make_statistic.sh --- Jenkinsfile_2 | 20 ++++++++++++++++++++ make_statistic.sh | 2 ++ 2 files changed, 22 insertions(+) create mode 100644 Jenkinsfile_2 create mode 100644 make_statistic.sh diff --git a/Jenkinsfile_2 b/Jenkinsfile_2 new file mode 100644 index 0000000..002ae72 --- /dev/null +++ b/Jenkinsfile_2 @@ -0,0 +1,20 @@ +pipeline { + agent any + //Definijuemy parametry, ktore bedzie mozna podac podczas wywolywania zadania + stages { + stage('Run Script') { + steps { + script { + sh "chmod +x -R ${env.WORKSPACE}" + sh './make_statistic.sh | tee output.txt' + } + } + + } + stage('Archive Output') { + steps { + archiveArtifacts 'output.txt' + } + } + } +} \ No newline at end of file diff --git a/make_statistic.sh b/make_statistic.sh new file mode 100644 index 0000000..36d595f --- /dev/null +++ b/make_statistic.sh @@ -0,0 +1,2 @@ +#!/bin/bash +echo "Hello World" \ No newline at end of file