diff options
author | Catalin Scrieciu <catalin.scrieciu@enea.com> | 2016-07-15 15:17:34 +0200 |
---|---|---|
committer | Catalin Scrieciu <catalin.scrieciu@enea.com> | 2016-07-15 15:17:34 +0200 |
commit | 532a645cee7996d707de237031c81cb8a7a8f4aa (patch) | |
tree | e6f770922b6273862587a2a69f5c87243baf19b5 | |
parent | b3742744472a79a1b997281a03f72e17dad443c8 (diff) | |
download | el_manifests-standard-532a645cee7996d707de237031c81cb8a7a8f4aa.tar.gz |
test
-rw-r--r-- | Jenkinsfile | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/Jenkinsfile b/Jenkinsfile index f4de611..8c13ff1 100644 --- a/Jenkinsfile +++ b/Jenkinsfile | |||
@@ -22,14 +22,10 @@ def getReleaseLayer(){ | |||
22 | return targetList | 22 | return targetList |
23 | } | 23 | } |
24 | 24 | ||
25 | def imageBuild(){ | 25 | def imageBuild(imageType, machine, profile, buildStamp, releaseLayer){ |
26 | print 'test' | ||
27 | } | ||
28 | |||
29 | def imageBuild(machine, profile, buildStamp, releaseLayer){ | ||
30 | { | 26 | { |
31 | it-> node{ | 27 | it-> node{ |
32 | print 'Starting build for each image type' | 28 | print 'Starting build for each image type '+imageType |
33 | print machine | 29 | print machine |
34 | print profile | 30 | print profile |
35 | print buildStamp | 31 | print buildStamp |
@@ -38,7 +34,7 @@ def imageBuild(machine, profile, buildStamp, releaseLayer){ | |||
38 | } | 34 | } |
39 | } | 35 | } |
40 | 36 | ||
41 | def targetBuild(trg){ | 37 | def targetBuild(trg, images_to_buid, profile, buildStamp, releaseLayer){ |
42 | { | 38 | { |
43 | target=trg-> node{ | 39 | target=trg-> node{ |
44 | //sh 'mkdir ${trg}' | 40 | //sh 'mkdir ${trg}' |
@@ -64,13 +60,14 @@ def targetBuild(trg){ | |||
64 | userRemoteConfigs: [[credentialsId: 'a797f854-983e-473e-b221-6d8ebafda16a', | 60 | userRemoteConfigs: [[credentialsId: 'a797f854-983e-473e-b221-6d8ebafda16a', |
65 | url: 'git@git.enea.se:linux/meta-enea-test.git']]]) | 61 | url: 'git@git.enea.se:linux/meta-enea-test.git']]]) |
66 | print 'Finished cloing meta-enea-test' | 62 | print 'Finished cloing meta-enea-test' |
63 | pwd() | ||
67 | stash includes: 'poky/*', name: trg+'_poky', useDefaultExcludes: false | 64 | stash includes: 'poky/*', name: trg+'_poky', useDefaultExcludes: false |
68 | } | 65 | } |
69 | } | 66 | } |
70 | def buildImageMap = [:] | 67 | def buildImageMap = [:] |
71 | for (image in images_to_buid){ | 68 | for (image in images_to_buid){ |
72 | def imageId = image+'_build' | 69 | def imageId = image+'_build' |
73 | buildImageMap[imageId] = imageBuild(imageId) | 70 | buildImageMap[imageId] = imageBuild(imageId, trg, profile, buildStamp, releaseLayer) |
74 | } | 71 | } |
75 | parallel buildImageMap | 72 | parallel buildImageMap |
76 | } | 73 | } |
@@ -119,7 +116,7 @@ node { | |||
119 | // Determine needed information like the EL Profile or the release layer to be used later as environment variables | 116 | // Determine needed information like the EL Profile or the release layer to be used later as environment variables |
120 | profile = getProfile() | 117 | profile = getProfile() |
121 | releaseLayer = getReleaseLayer() | 118 | releaseLayer = getReleaseLayer() |
122 | buildStamp = env.BUILD_ID | 119 | buildStamp = env.BUILD_TIMESTAMP |
123 | print profile | 120 | print profile |
124 | print releaseLayer | 121 | print releaseLayer |
125 | print buildStamp | 122 | print buildStamp |
@@ -144,7 +141,7 @@ stage 'Build' | |||
144 | def buildTargetMap = [:] | 141 | def buildTargetMap = [:] |
145 | for (item in targetList){ | 142 | for (item in targetList){ |
146 | def id = item+'_build' | 143 | def id = item+'_build' |
147 | buildTargetMap[id] = targetBuild(item) | 144 | buildTargetMap[id] = targetBuild(item, images_to_buid, profile, buildStamp, releaseLayer) |
148 | } | 145 | } |
149 | // Run threads for each target in parallel | 146 | // Run threads for each target in parallel |
150 | parallel buildTargetMap | 147 | parallel buildTargetMap |