diff --git a/JenkinsfileStats b/JenkinsfileStats new file mode 100644 index 0000000..3e50212 --- /dev/null +++ b/JenkinsfileStats @@ -0,0 +1,24 @@ +node { + stage('Preparation') { + + properties([ + parameters([ + buildSelector(defaultSelector: lastSuccessful(), + description: 'Which build to use for copying artifacts', + name: 'BUILD_SELECTOR') + ]) + ] + ) + + } + stage('Clone repo') { + checkout([$class: 'GitSCM', branches: [[name: '*/stats']], doGenerateSubmoduleConfigurations: false, extensions: [], submoduleCfg: [], userRemoteConfigs: [[url: 'https://git.wmi.amu.edu.pl/s434765/ium_434765']]]) + copyArtifacts filter: 'data_shuf', fingerprintArtifacts: true, projectName: 's434765-create-dataset', selector: buildParameter("BUILD_SELECTOR") + sh ''' + #!/usr/bin/env bash + chmod 777 get_stats_simple.sh + ./get_stats_simple.sh | tee output.txt + ''' + archiveArtifacts 'output.txt' + } + } \ No newline at end of file diff --git a/get_stats_simple.sh b/get_stats_simple.sh new file mode 100644 index 0000000..26f392c --- /dev/null +++ b/get_stats_simple.sh @@ -0,0 +1,2 @@ +#!/bin/bash +wc -l "data_shuf" \ No newline at end of file