summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDragos Motrea <Dragos.Motrea@enea.com>2017-09-21 14:50:13 +0200
committerAdrian Dudau <adrian.dudau@enea.com>2017-09-22 10:46:06 +0200
commit80e953c05e3fadc66fa6714ebdbd6954d08aef9e (patch)
treeddb0cf5d064b6938cb6344610025c907a82f2693
parentb02b04d89fb9e648fafa24c8e27db82618a3eba1 (diff)
downloadel_manifests-nfv-access-80e953c05e3fadc66fa6714ebdbd6954d08aef9e.tar.gz
Modified Jenkinsfile to get right Profile name
In Jenkinsfile the PROFILE variable value was set to the last word from the manifest name delimited by '-' character. In case of el_manifests-nfv-access the PROFILE name should be 'nfv-access', not 'access'. This caused build failure in Jenkins. Signed-off-by: Dragos Motrea <Dragos.Motrea@enea.com> Signed-off-by: Adrian Dudau <adrian.dudau@enea.com>
-rw-r--r--Jenkinsfile12
1 files changed, 11 insertions, 1 deletions
diff --git a/Jenkinsfile b/Jenkinsfile
index 9c3b442..99796df 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -8,7 +8,17 @@ IS_CI = false
8 8
9def git_repo = MANIFEST_REPOSITORY.trim().split('/')[-1] 9def git_repo = MANIFEST_REPOSITORY.trim().split('/')[-1]
10def git_repo_name = git_repo.replace('.git','') 10def git_repo_name = git_repo.replace('.git','')
11PROFILE = git_repo_name.split('-')[-1] 11def profile_name = git_repo_name.split('-')
12def result = '';
13for (i = 1; i < profile_name.length; i++) {
14 if (i != 1) {
15 result += '-' + profile_name[i]
16 } else {
17 result += profile_name[i]
18 }
19}
20
21PROFILE = result
12BRANCH = env.BRANCH_NAME 22BRANCH = env.BRANCH_NAME
13 23
14fileLoader.withGit('git@git.enea.se:eltf/jenkins.git', 'master', null, '') { 24fileLoader.withGit('git@git.enea.se:eltf/jenkins.git', 'master', null, '') {