diff options
-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, '') { |