diff options
author | Andrei Gheorghiu <andrei.gheorghiu@enea.com> | 2016-10-13 13:59:08 +0200 |
---|---|---|
committer | Andrei Gheorghiu <andrei.gheorghiu@enea.com> | 2016-10-13 13:59:08 +0200 |
commit | 702366b2f34e36aebe0f62942c395c37459b014a (patch) | |
tree | a1e4aa676d28189436d6cc837aa7b37508560165 /Jenkinsfile | |
parent | ecfc1f2b709a5fb8073d62b831b8a0bc79ad7626 (diff) | |
download | el_manifests-standard-702366b2f34e36aebe0f62942c395c37459b014a.tar.gz |
added freeze manifest stage before build
Diffstat (limited to 'Jenkinsfile')
-rw-r--r-- | Jenkinsfile | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/Jenkinsfile b/Jenkinsfile index c5b6b7f..7254079 100644 --- a/Jenkinsfile +++ b/Jenkinsfile | |||
@@ -1,21 +1,25 @@ | |||
1 | #!/bin/env groovy | 1 | #!/bin/env groovy |
2 | FIRST_JOB_NAME = env.JOB_NAME | 2 | #This script is used internally by Enea for automated tests on Linux builds |
3 | //stage "Loading Sripts" | ||
4 | 3 | ||
5 | MANIFEST_REPOSITORY = null | 4 | MANIFEST_REPOSITORY = null |
6 | 5 | ||
7 | node ('master') { | 6 | node ('master') { |
8 | print 'master node' | 7 | print 'master node' |
9 | dir ("../${env.BRANCH_NAME}@script") { | 8 | dir ("../${env.BRANCH_NAME}@script") { |
10 | def git_remote_url = sh returnStdout: true, script: "git remote get-url origin" | 9 | def git_remote_url = sh returnStdout: true, script: "git remote get-url origin" |
11 | def git_repo = git_remote_url.trim().split('/')[-1] | 10 | def git_repo = git_remote_url.trim().split('/')[-1] |
12 | def git_repo_name = git_repo.replace('.git','') | 11 | def git_repo_name = git_repo.replace('.git','') |
13 | def profile = git_repo_name.split('-')[-1] | 12 | def profile = git_repo_name.split('-')[-1] |
14 | env.PROFILE = profile | 13 | env.PROFILE = profile |
15 | MANIFEST_REPOSITORY = git_remote_url.trim() | 14 | MANIFEST_REPOSITORY = git_remote_url.trim() |
16 | sh 'echo $PROFILE' | 15 | sh 'echo $PROFILE' |
17 | } | 16 | } |
18 | } | 17 | } |
18 | |||
19 | fileLoader.withGit('git@git.enea.se:eltf/jenkins.git', 'master', null, '') { | ||
20 | fileLoader.load('freeze_manifest.groovy'); | ||
21 | } | ||
22 | |||
19 | fileLoader.withGit('git@git.enea.se:eltf/jenkins.git', 'master', null, '') { | 23 | fileLoader.withGit('git@git.enea.se:eltf/jenkins.git', 'master', null, '') { |
20 | fileLoader.load('el_pipeline.groovy'); | 24 | fileLoader.load('eltf_pipeline.groovy'); |
21 | } | 25 | } |