Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Build] Simplify native build agent definition and platform list #671

Merged
merged 2 commits into from
Sep 15, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 20 additions & 24 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As centos 8 is deprecated and for gtk4 we are looking into moving to newer version it would be better to try with eclipse/platformreleng-centos-swt-build:9.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would like to do that in a separate PR dedicated only to that especially since using centos-9 has the non-trivial implications.

Btw. inheritFrom: 'centos-latest' to inherit the very basic configuration like volumes, credentials etc. The image used is the one specified in the line below.

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() } }
}
}

Expand Down Expand Up @@ -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 {
Expand Down Expand Up @@ -221,6 +216,7 @@ pipeline {
dir('libs') {
stash "equinox.binaries.${PLATFORM}"
}
cleanWs() // workspace not cleaned by default
}
dir("libs/${PLATFORM}") {
unstash "equinox.binaries.${PLATFORM}"
Expand Down
Loading