From 858d373203f1683505bde6db55348c97cc32b57b Mon Sep 17 00:00:00 2001 From: Artur Nowakowski Date: Fri, 3 Apr 2020 10:49:56 +0200 Subject: [PATCH] Counting lines --- Jenkinsfile | 13 +++++++++++-- count_lines.sh | 3 +++ 2 files changed, 14 insertions(+), 2 deletions(-) create mode 100755 count_lines.sh diff --git a/Jenkinsfile b/Jenkinsfile index e7d04ab..0ecc9eb 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,10 +1,19 @@ pipeline { agent any stages { - stage('Stage 1') { + stage('Checkout') { steps { - echo 'Hello world!' + checkout([$class: 'GitSCM', branches: [[name: '*/master']], doGenerateSubmoduleConfigurations: false, extensions: [], submoduleCfg: [], userRemoteConfigs: [[url: 'https://git.wmi.amu.edu.pl/s416138/s416138-mlworkshops']]]) } } + stage('Copy results'){ + copyArtifacts filter: 'wikinews_results.tsv', fingerprintArtifacts: true, projectName: 'ASR-eval', selector: lastSuccessful() + } + stage('Count lines'){ + sh label: '', script: './count_lines.sh' + } + stage('Archive results'){ + archiveArtifacts 'counted_lines.txt' + } } } diff --git a/count_lines.sh b/count_lines.sh new file mode 100755 index 0000000..b2ca569 --- /dev/null +++ b/count_lines.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +wc -l wikinews_results.tsv > counted_lines.txt