diff options
author | Dragos Motrea <Dragos.Motrea@enea.com> | 2017-09-21 14:50:13 +0200 |
---|---|---|
committer | Adrian Dudau <adrian.dudau@enea.com> | 2017-09-22 10:46:06 +0200 |
commit | 80e953c05e3fadc66fa6714ebdbd6954d08aef9e (patch) | |
tree | ddb0cf5d064b6938cb6344610025c907a82f2693 /Jenkinsfile | |
parent | b02b04d89fb9e648fafa24c8e27db82618a3eba1 (diff) | |
download | el_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>
Diffstat (limited to 'Jenkinsfile')
-rw-r--r-- | Jenkinsfile | 12 |
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 | ||
9 | def git_repo = MANIFEST_REPOSITORY.trim().split('/')[-1] | 9 | def git_repo = MANIFEST_REPOSITORY.trim().split('/')[-1] |
10 | def git_repo_name = git_repo.replace('.git','') | 10 | def git_repo_name = git_repo.replace('.git','') |
11 | PROFILE = git_repo_name.split('-')[-1] | 11 | def profile_name = git_repo_name.split('-') |
12 | def result = ''; | ||
13 | for (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 | |||
21 | PROFILE = result | ||
12 | BRANCH = env.BRANCH_NAME | 22 | BRANCH = env.BRANCH_NAME |
13 | 23 | ||
14 | fileLoader.withGit('git@git.enea.se:eltf/jenkins.git', 'master', null, '') { | 24 | fileLoader.withGit('git@git.enea.se:eltf/jenkins.git', 'master', null, '') { |