From 9feffb613e0d4af6f87e9dc5576be8df63380cba Mon Sep 17 00:00:00 2001 From: Hannes Wellmann Date: Sat, 14 Sep 2024 15:48:21 +0200 Subject: [PATCH 1/2] [Build] Simplify native build agent definition and platform list --- Jenkinsfile | 43 +++++++++++++++++++------------------------ 1 file changed, 19 insertions(+), 24 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 733fc200ae2..3a434ab1f04 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -16,33 +16,21 @@ 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(inheritFrom: 'centos-latest' /* inhert general configuration */, containers: [ + containerTemplate(name: 'launcherbuild', image: 'eclipse/platformreleng-centos-swt-build:8', + resourceRequestCpu:'1000m', resourceRequestMemory:'512Mi', + resourceLimitCpu:'2000m', resourceLimitMemory:'4096Mi', + alwaysPullImage: true, command: 'cat', ttyEnabled: true) + ]) { + 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() } } + // See the Definition of the RelEng Jenkins instance in + // https://github.com/eclipse-cbi/jiro/tree/master/instances/eclipse.platform.releng + node('native.builder-' + platform) { stage(nativeBuildStageName) { body() } } } } @@ -181,7 +169,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 { From 59e8ffb325d6f87020981275846edfd5afe2282e Mon Sep 17 00:00:00 2001 From: Hannes Wellmann Date: Sat, 14 Sep 2024 22:37:28 +0200 Subject: [PATCH 2/2] [Build] Clean up native build agent workspaces after build --- Jenkinsfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Jenkinsfile b/Jenkinsfile index 3a434ab1f04..0dfaabdae23 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -216,6 +216,7 @@ pipeline { dir('libs') { stash "equinox.binaries.${PLATFORM}" } + cleanWs() // workspace not cleaned by default } dir("libs/${PLATFORM}") { unstash "equinox.binaries.${PLATFORM}"