From 80e953c05e3fadc66fa6714ebdbd6954d08aef9e Mon Sep 17 00:00:00 2001 From: Dragos Motrea Date: Thu, 21 Sep 2017 14:50:13 +0200 Subject: 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 Signed-off-by: Adrian Dudau --- Jenkinsfile | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 9c3b442..99796df 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -8,7 +8,17 @@ IS_CI = false def git_repo = MANIFEST_REPOSITORY.trim().split('/')[-1] def git_repo_name = git_repo.replace('.git','') -PROFILE = git_repo_name.split('-')[-1] +def profile_name = git_repo_name.split('-') +def result = ''; +for (i = 1; i < profile_name.length; i++) { + if (i != 1) { + result += '-' + profile_name[i] + } else { + result += profile_name[i] + } +} + +PROFILE = result BRANCH = env.BRANCH_NAME fileLoader.withGit('git@git.enea.se:eltf/jenkins.git', 'master', null, '') { -- cgit v1.2.3-54-g00ecf