summaryrefslogtreecommitdiffstats
path: root/Jenkinsfile
diff options
context:
space:
mode:
authorAndrei Gheorghiu <andrei.gheorghiu@enea.com>2016-10-18 15:53:13 +0200
committerAndrei Gheorghiu <andrei.gheorghiu@enea.com>2016-10-18 15:53:13 +0200
commit18a77b4e5dd658171c3c45b847b1cd7ef6ac864f (patch)
treebf77cc9c998880fc73da36ca94db8880b1d61777 /Jenkinsfile
parent775df309c13c98ea3d1622ac40651f59f997359e (diff)
downloadel_manifests-standard-18a77b4e5dd658171c3c45b847b1cd7ef6ac864f.tar.gz
changed how we get manifest repo url
Diffstat (limited to 'Jenkinsfile')
-rw-r--r--Jenkinsfile33
1 files changed, 21 insertions, 12 deletions
diff --git a/Jenkinsfile b/Jenkinsfile
index 409597e..087101e 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -5,18 +5,27 @@
5MANIFEST_REPOSITORY = null 5MANIFEST_REPOSITORY = null
6BRANCH = env.BRANCH_NAME 6BRANCH = env.BRANCH_NAME
7 7
8node ('master') { 8def scmInstance = scm.getUserRemoteConfigs()[0]
9 print 'master node' 9MANIFEST_REPOSITORY = scmInstance.getUrl()
10 dir ("../${env.BRANCH_NAME}@script") { 10def git_repo_name = scmInstance.getName()
11 def git_remote_url = sh returnStdout: true, script: "git remote get-url origin" 11env.PROFILE = git_repo_name.split('-')[-1]
12 def git_repo = git_remote_url.trim().split('/')[-1] 12
13 def git_repo_name = git_repo.replace('.git','') 13print "MANIFEST_REPOSITORY: " + MANIFEST_REPOSITORY
14 def profile = git_repo_name.split('-')[-1] 14print "git_repo_name: " + git_repo_name
15 env.PROFILE = profile 15print "PROFILE: " + env.PROFILE
16 MANIFEST_REPOSITORY = git_remote_url.trim() 16
17 sh 'echo $PROFILE' 17// node ('master') {
18 } 18 // print 'master node'
19} 19 // dir ("../${env.BRANCH_NAME}@script") {
20 // def git_remote_url = sh returnStdout: true, script: "git remote get-url origin"
21 // def git_repo = git_remote_url.trim().split('/')[-1]
22 // def git_repo_name = git_repo.replace('.git','')
23 // def profile = git_repo_name.split('-')[-1]
24 // env.PROFILE = profile
25 // MANIFEST_REPOSITORY = git_remote_url.trim()
26 // sh 'echo $PROFILE'
27 // }
28// }
20 29
21fileLoader.withGit('git@git.enea.se:eltf/jenkins.git', 'master', null, '') { 30fileLoader.withGit('git@git.enea.se:eltf/jenkins.git', 'master', null, '') {
22 fileLoader.load('freeze_manifest.groovy'); 31 fileLoader.load('freeze_manifest.groovy');