From a2db97d44ecb72425f0219ce7239e0cdb55470d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cezary=20Ga=C5=82=C4=85zkiewicz?= Date: Mon, 28 Mar 2022 01:14:06 +0200 Subject: [PATCH] Zad 03.Jenkins - stats --- Jenkinsfile_stats | 21 +++++++++++++++++++++ stats.sh | 1 + 2 files changed, 22 insertions(+) create mode 100644 Jenkinsfile_stats create mode 100644 stats.sh diff --git a/Jenkinsfile_stats b/Jenkinsfile_stats new file mode 100644 index 0000000..3ad5740 --- /dev/null +++ b/Jenkinsfile_stats @@ -0,0 +1,21 @@ +pipeline { + agent any + stages { + stage('Checkout') { + steps { + checkout([$class: 'GitSCM', branches: [[name: '*/master']], extensions: [], userRemoteConfigs: [[credentialsId: 's470623', url: 'https://git.wmi.amu.edu.pl/s470623/ium_470623.git']]]) + } + } + stage('Copy artifacts') { + steps { + copyArtifacts fingerprintArtifacts: true, projectName: 's470623-create-dataset', selector: lastSuccessful() + sh 'chmod u+x ./stats.sh' + sh './stats.sh' + } + } + stage('Archive') { + steps { + archiveArtifacts 'stats.txt' + } + } +} \ No newline at end of file diff --git a/stats.sh b/stats.sh new file mode 100644 index 0000000..3a3b6ce --- /dev/null +++ b/stats.sh @@ -0,0 +1 @@ +wc -l steel_industry_data* > stats.txt \ No newline at end of file