Skip to content

Commit

Permalink
[Build] Simplify native build agent definition and platform list
Browse files Browse the repository at this point in the history
  • Loading branch information
HannesWell committed Sep 14, 2024
1 parent b1adfa2 commit 510dc92
Showing 1 changed file with 17 additions and 24 deletions.
41 changes: 17 additions & 24 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,33 +16,19 @@
def runOnNativeBuildAgent(String platform, Closure body) {
def final nativeBuildStageName = 'Perform native launcher build'
if (platform == 'gtk.linux.x86_64') {
return podTemplate(yaml: '''
apiVersion: v1
kind: Pod
spec:
containers:
- name: "launcherbuild"
image: "eclipse/platformreleng-centos-swt-build:8"
imagePullPolicy: "Always"
command:
- cat
tty: true
volumeMounts:
- name: tools
mountPath: /opt/tools
volumes:
- name: tools
persistentVolumeClaim:
claimName: tools-claim-jiro-releng
- name: volume-known-hosts
configMap:
name: known-hosts
''') { node(POD_LABEL) { stage(nativeBuildStageName) { container('launcherbuild') { body() } } } }
podTemplate(containers: [
containerTemplate(name: 'launcherbuild', image: 'eclipse/platformreleng-centos-swt-build:8',
resourceRequestCpu:'1000m', resourceRequestMemory:'512Mi',
resourceLimitCpu:'2000m', resourceLimitMemory:'4096Mi'
)
]) {
node(POD_LABEL) { stage(nativeBuildStageName) { container('launcherbuild') { body() } } }
}
} else {
if (platform == 'cocoa.macosx.x86_64') {
platform = 'cocoa.macosx.aarch64'
}
return node('native.builder-' + platform) { stage(nativeBuildStageName) { body() } }
node('native.builder-' + platform) { stage(nativeBuildStageName) { body() } }
}
}

Expand Down Expand Up @@ -181,7 +167,14 @@ pipeline {
axes {
axis {
name 'PLATFORM'
values 'cocoa.macosx.aarch64' , 'cocoa.macosx.x86_64', 'gtk.linux.aarch64', 'gtk.linux.ppc64le', 'gtk.linux.x86_64', 'win32.win32.aarch64', 'win32.win32.x86_64'
values \
'cocoa.macosx.aarch64' ,\
'cocoa.macosx.x86_64' ,\
'gtk.linux.aarch64' ,\
'gtk.linux.ppc64le' ,\
'gtk.linux.x86_64' ,\
'win32.win32.aarch64' ,\
'win32.win32.x86_64'
}
}
stages {
Expand Down

0 comments on commit 510dc92

Please sign in to comment.