From 9dbcdedbf1f02dded9cd19d1c0d8d7ca9dbe9b61 Mon Sep 17 00:00:00 2001 From: Andrei Gheorghiu Date: Tue, 18 Oct 2016 15:58:06 +0200 Subject: changed how we get manifest repo url --- Jenkinsfile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'Jenkinsfile') diff --git a/Jenkinsfile b/Jenkinsfile index 09bb05f..5c4d66c 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -7,8 +7,10 @@ BRANCH = env.BRANCH_NAME def scmInstance = scm.getUserRemoteConfigs()[0] MANIFEST_REPOSITORY = scmInstance.getUrl() -def git_repo_name = scmInstance.getName() -env.PROFILE = git_repo_name.split('-')[-1] +def git_repo = MANIFEST_REPOSITORY.trim().split('/')[-1] +def git_repo_name = git_repo.replace('.git','') +def profile = git_repo_name.split('-')[-1] +env.PROFILE = profile print "MANIFEST_REPOSITORY: " + MANIFEST_REPOSITORY print "git_repo_name: " + git_repo_name -- cgit v1.2.3-54-g00ecf