Skip to content

Commit 81b4af1

Browse files
authored
Update Jenkinsfile
1 parent 4e8bc3a commit 81b4af1

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

Jenkinsfile

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
// List of targets to compile
2-
def morpheusTargets = [
2+
def targets = [
33
//"LPC1768",
44
//"NUCLEO_F401RE",
55
//"NRF51822",
66
"K64F"
77
]
88

9-
// Map morpheus toolchains to compiler labels on Jenkins
9+
// Map toolchains to compiler labels on Jenkins
1010
def toolchains = [
1111
//ARM: "armcc",
1212
//IAR: "iar_arm",
@@ -17,14 +17,14 @@ def toolchains = [
1717
def stepsForParallel = [:]
1818

1919
// Jenkins pipeline does not support map.each, we need to use oldschool for loop
20-
for (int i = 0; i < morpheusTargets.size(); i++) {
20+
for (int i = 0; i < targets.size(); i++) {
2121
for(int j = 0; j < toolchains.size(); j++) {
22-
def target = morpheusTargets.get(i)
22+
def target = targets.get(i)
2323
def toolchain = toolchains.keySet().asList().get(j)
2424
def compilerLabel = toolchains.get(toolchain)
2525

2626
def stepName = "${target} ${toolchain}"
27-
stepsForParallel[stepName] = morpheusBuildStep(target, compilerLabel, toolchain)
27+
stepsForParallel[stepName] = buildStep(target, compilerLabel, toolchain)
2828
}
2929
}
3030

@@ -42,6 +42,8 @@ build job: 'ARMmbed/mbed-client-testapp/master', parameters: [[$class: 'StringPa
4242
build job: 'ARMmbed/mbed-client-cliapp/master', parameters: [[$class: 'StringParameterValue', name: 'mbed_os_revision', value: "${env.GIT_REVISION}"]]
4343
}, failFast: true
4444

45+
/* End of execution, internal functions below */
46+
4547
def execute(cmd) {
4648
if (isUnix()) {
4749
sh "${cmd}"
@@ -50,8 +52,8 @@ def execute(cmd) {
5052
}
5153
}
5254

53-
//Create morpheus build steps for parallel execution
54-
def morpheusBuildStep(target, compilerLabel, toolchain) {
55+
//Create build steps for parallel execution
56+
def buildStep(target, compilerLabel, toolchain) {
5557
return {
5658
node ("${compilerLabel}") {
5759
deleteDir()

0 commit comments

Comments
 (0)