Skip to content

Commit

Permalink
Add Jenkins file and POD configuration for GitHub Jenkins build
Browse files Browse the repository at this point in the history
Signed-off-by: Bernd Hufmann <bernd.hufmann@ericsson.com>
  • Loading branch information
bhufmann committed Feb 6, 2024
1 parent 488efb6 commit 8e341a7
Show file tree
Hide file tree
Showing 2 changed files with 92 additions and 0 deletions.
46 changes: 46 additions & 0 deletions jenkins/Jenkinsfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
/*******************************************************************************
* Copyright (c) 2024 Ericsson.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
* which accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
*******************************************************************************/
pipeline {
agent {
kubernetes {
label 'tracecompass-test-traces-build'
yamlFile 'jenkins/pod-templates/tracecompass-test-traces-pod.yaml'
}
}
options {
timestamps()
timeout(time: 1, unit: 'HOURS')
disableConcurrentBuilds()
}
tools {
maven 'apache-maven-3.9.5'
jdk 'openjdk-jdk17-latest'
}
environment {
MAVEN_OPTS="-Xms768m -Xmx4096m -XX:+UseSerialGC"
}
stages {
stage('Build') {
steps {
container('tracecompass') {
sh 'mvn clean install -Dmaven.repo.local=$WORKSPACE/.m2/repository ${MAVEN_ARGS}'
}
}
post {
always {
container('tracecompass') {
junit '**/target/surefire-reports/*.xml'
}
}
}
}
}
}
46 changes: 46 additions & 0 deletions jenkins/pod-templates/tracecompass-test-traces-pod.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
apiVersion: v1
kind: Pod
spec:
containers:
- name: tracecompass
image: eclipse/tracecompass-build-env:18.04
imagePullPolicy: Always
tty: true
command: [ "/bin/sh" ]
args: ["-c", "/home/tracecompass/.vnc/xstartup.sh && cat"]
resources:
requests:
memory: "2.6Gi"
cpu: "1.3"
limits:
memory: "2.6Gi"
cpu: "1.3"
volumeMounts:
- name: settings-xml
mountPath: /home/jenkins/.m2/settings.xml
subPath: settings.xml
readOnly: true
- name: m2-repo
mountPath: /home/jenkins/.m2/repository
- name: tools
mountPath: /opt/tools
- name: jnlp
image: 'eclipsecbi/jenkins-jnlp-agent'
volumeMounts:
- mountPath: /home/jenkins/.ssh
name: volume-known-hosts
volumes:
- name: volume-known-hosts
configMap:
name: known-hosts
- name: settings-xml
secret:
secretName: m2-secret-dir
items:
- key: settings.xml
path: settings.xml
- name: m2-repo
emptyDir: {}
- name: tools
persistentVolumeClaim:
claimName: tools-claim-jiro-tracecompass

0 comments on commit 8e341a7

Please sign in to comment.