From a245a38dfe086ab559a794ceeef7c6695ebeb5cb Mon Sep 17 00:00:00 2001 From: s434765 Date: Sat, 27 Mar 2021 22:34:06 +0100 Subject: [PATCH 1/5] stats job --- Jenkinsfile | 26 ++++++-------------------- get_stats_simple.sh | 2 ++ 2 files changed, 8 insertions(+), 20 deletions(-) create mode 100644 get_stats_simple.sh diff --git a/Jenkinsfile b/Jenkinsfile index c079258..3ba7acb 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,36 +1,22 @@ node { - stage('Preparation') { + stage('Preparation') { properties([ parameters([ - string(defaultValue: 'karopa', - description: 'Kaggle username', - name: 'KAGGLE_USERNAME', - trim: false), - password(defaultValue: '', - description: 'Kaggle token', - name: 'KAGGLE_KEY'), - string(defaultValue: '5000', - description: 'Data cutoff', - name: 'CUTOFF', - trim: false) + buildSelector(defaultSelector: lastSuccessful(), + description: 'Which build to use for copying artifacts', + name: 'BUILD_SELECTOR') ]) ] ) } stage('Clone repo') { - withEnv(["KAGGLE_USERNAME=${params.KAGGLE_USERNAME}", "KAGGLE_KEY=${params.KAGGLE_KEY}"]){ checkout([$class: 'GitSCM', branches: [[name: '*/master']], 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_data_simple.sh - ./get_data_simple.sh $CUTOFF + ./get_stats_simple.sh ''' - archiveArtifacts "data_dev" - archiveArtifacts "data_shuf" - archiveArtifacts "data_test" - archiveArtifacts "data_train" } - } } \ 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 From 4662bab18f4bbc80d037e23da7217df090d4a0e5 Mon Sep 17 00:00:00 2001 From: s434765 Date: Sat, 27 Mar 2021 22:42:21 +0100 Subject: [PATCH 2/5] pipeline fix --- Jenkinsfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Jenkinsfile b/Jenkinsfile index 3ba7acb..8464ecf 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -16,6 +16,7 @@ node { 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 ''' } From deac35dc24c0eb060eecb9001f4b1d42f676a67d Mon Sep 17 00:00:00 2001 From: s434765 Date: Sat, 27 Mar 2021 22:54:27 +0100 Subject: [PATCH 3/5] pipeline fix --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 8464ecf..f29d253 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -12,7 +12,7 @@ node { } stage('Clone repo') { - checkout([$class: 'GitSCM', branches: [[name: '*/master']], doGenerateSubmoduleConfigurations: false, extensions: [], submoduleCfg: [], userRemoteConfigs: [[url: 'https://git.wmi.amu.edu.pl/s434765/ium_434765']]]) + 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 From 7cbe2168fbaa35ac3a5c0383457cbf2bc4ee7844 Mon Sep 17 00:00:00 2001 From: s434765 Date: Sat, 27 Mar 2021 22:56:33 +0100 Subject: [PATCH 4/5] pipeline fix --- Jenkinsfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index f29d253..3e50212 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -17,7 +17,8 @@ node { sh ''' #!/usr/bin/env bash chmod 777 get_stats_simple.sh - ./get_stats_simple.sh + ./get_stats_simple.sh | tee output.txt ''' + archiveArtifacts 'output.txt' } } \ No newline at end of file From 9b5a5f79376ff5ce21adbc3742159c01751ef408 Mon Sep 17 00:00:00 2001 From: Karolina Oparczyk Date: Wed, 14 Apr 2021 18:06:15 +0200 Subject: [PATCH 5/5] update jenkins file --- Jenkinsfile => JenkinsfileStats | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename Jenkinsfile => JenkinsfileStats (100%) diff --git a/Jenkinsfile b/JenkinsfileStats similarity index 100% rename from Jenkinsfile rename to JenkinsfileStats