forked from eclipse-amlen/amlen
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjenkins.buildalltier1
76 lines (71 loc) · 3.32 KB
/
jenkins.buildalltier1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
pipeline {
agent {
kubernetes {
label 'amlen-buildalltier1-pod'
yaml """
apiVersion: v1
kind: Pod
spec:
containers:
- name: jnlp
resources:
limits:
memory: "300Mi"
cpu: "200m"
requests:
memory: "300Mi"
cpu: "200m"
"""
}
}
parameters{
gitParameter branchFilter: 'origin/(.*)', defaultValue: 'main', name: 'branchName', type: 'PT_BRANCH'
string(name: 'buildId', defaultValue: '', description: 'Build Identifier to ensure build can be easily identified (set blank to autogenerate - default)')
string(name: 'buildcontainerVersion', defaultValue: '1.0.0.6', description: 'Version of the amlen-build-(distro) container to use to do the build')
}
stages {
stage('Init') {
steps {
container('jnlp') {
script {
if (buildId != null && buildId != '') {
env.BUILD_LABEL = buildId
}
if (env.BUILD_LABEL == null ) {
env.BUILD_LABEL = sh(script: "date +%Y%m%d-%H%M", returnStdout: true).toString().trim() +"_eclipse"
}
}
echo "In BuildAll Init, BUILD_LABEL is ${env.BUILD_LABEL}"
}
}
}
stage('BuildFanOut') {
steps {
container('jnlp') {
echo "In BuildFanout, BUILD_LABEL is ${env.BUILD_LABEL}"
build job: 'Build_SingleBranch_ChooseDistro', parameters: [
string(name: 'branchName', value: String.valueOf(branchName)),
string(name: 'buildId', value: String.valueOf(env.BUILD_LABEL)),
string(name: 'buildcontainerVersion', value: buildcontainerVersion),
string(name: 'distro', value: "centos7")
]
build job: 'Build_SingleBranch_ChooseDistro', parameters: [
string(name: 'branchName', value: String.valueOf(branchName)),
string(name: 'buildId', value: String.valueOf(env.BUILD_LABEL)),
string(name: 'buildcontainerVersion', value: buildcontainerVersion),
string(name: 'distro', value: "alma8")]
build job: 'Build_SingleBranch_ChooseDistro', parameters: [
string(name: 'branchName', value: String.valueOf(branchName)),
string(name: 'buildId', value: String.valueOf(env.BUILD_LABEL)),
string(name: 'buildcontainerVersion', value: buildcontainerVersion),
string(name: 'distro', value: "alma9")]
build job: 'Build_SingleBranch_ChooseDistro', parameters: [
string(name: 'branchName', value: String.valueOf(branchName)),
string(name: 'buildId', value: String.valueOf(env.BUILD_LABEL)),
string(name: 'buildcontainerVersion', value: buildcontainerVersion),
string(name: 'distro', value: "fedora")]
}
}
}
}
}