1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-06-07 17:56:01 +02:00

[releng] Add Jenkinsfile for CDT 10.7 branch

This commit is contained in:
Jonah Graham 2022-08-15 15:36:07 -04:00
parent d8f06c89a9
commit 4ff87fda4b
5 changed files with 194 additions and 0 deletions

6
.gitattributes vendored
View file

@ -36,6 +36,12 @@ Makefile text
# file permission +x # file permission +x
*.sh text *.sh text
# Build files
*.Jenkinsfile text
Jenkinsfile text
*.yaml text
*.yml text
# Qt # Qt
*.pro text *.pro text
*.qml text *.qml text

71
Jenkinsfile vendored Normal file
View file

@ -0,0 +1,71 @@
pipeline {
agent any
options {
timestamps()
}
stages {
stage('Run Build') {
failFast false
parallel {
stage('Code Formatting Checks') {
agent {
kubernetes {
yamlFile 'jenkins/pod-templates/cdt-full-pod-plus-eclipse-install.yaml'
}
}
steps {
container('cdt') {
timeout(activity: true, time: 30) {
withEnv(['MAVEN_OPTS=-XX:MaxRAMPercentage=60.0']) {
sh 'JAVA_HOME=$JAVA11_HOME PATH=$JAVA_HOME/bin:$PATH MVN="/usr/share/maven/bin/mvn -Dmaven.repo.local=/home/jenkins/.m2/repository \
--settings /home/jenkins/.m2/settings.xml" ./releng/scripts/check_code_cleanliness.sh'
}
}
}
}
post {
always {
container('cdt') {
archiveArtifacts allowEmptyArchive: true, artifacts: '*.log,native/org.eclipse.cdt.native.serial/**,core/org.eclipse.cdt.core.*/**'
}
}
}
}
stage('Build and verify') {
agent {
kubernetes {
yamlFile 'jenkins/pod-templates/cdt-full-pod-standard.yaml'
}
}
steps {
container('cdt') {
timeout(activity: true, time: 20) {
withEnv(['MAVEN_OPTS=-XX:MaxRAMPercentage=60.0']) {
sh 'JAVA_HOME=$JAVA11_HOME PATH=$JAVA_HOME/bin:$PATH /usr/share/maven/bin/mvn \
clean verify -B -V \
-Dmaven.test.failure.ignore=true \
-DexcludedGroups=flakyTest,slowTest \
-P baseline-compare-and-replace \
-Ddsf.gdb.tests.timeout.multiplier=50 \
-Dindexer.timeout=300 \
-P production \
-Dmaven.repo.local=/home/jenkins/.m2/repository \
--settings /home/jenkins/.m2/settings.xml \
'
}
}
}
}
post {
always {
container('cdt') {
junit '*/*/target/surefire-reports/*.xml,terminal/plugins/org.eclipse.tm.terminal.test/target/surefire-reports/*.xml'
archiveArtifacts '*/*/target/surefire-reports/**,terminal/plugins/org.eclipse.tm.terminal.test/target/surefire-reports/**,**/target/work/data/.metadata/.log,releng/org.eclipse.cdt.repo/target/org.eclipse.cdt.repo.zip,releng/org.eclipse.cdt.repo/target/repository/**,releng/org.eclipse.cdt.testing.repo/target/org.eclipse.cdt.testing.repo.zip,releng/org.eclipse.cdt.testing.repo/target/repository/**,debug/org.eclipse.cdt.debug.application.product/target/product/*.tar.gz,debug/org.eclipse.cdt.debug.application.product/target/products/*.zip,debug/org.eclipse.cdt.debug.application.product/target/products/*.tar.gz,debug/org.eclipse.cdt.debug.application.product/target/repository/**,lsp4e-cpp/org.eclipse.lsp4e.cpp.site/target/repository/**,lsp4e-cpp/org.eclipse.lsp4e.cpp.site/target/org.eclipse.lsp4e.cpp.repo.zip'
}
}
}
}
}
}
}
}

View file

@ -0,0 +1,39 @@
apiVersion: v1
kind: Pod
spec:
containers:
- name: cdt
image: quay.io/eclipse-cdt/cdt-infra-plus-eclipse-install@sha256:efa01be7dc63af2f239fff3ea929d2d79b07084983e9ab859eb480fcc17b5ba2
tty: true
args: ["/bin/sh", "-c", "/home/vnc/.vnc/xstartup.sh && cat"]
resources:
requests:
memory: "2662Mi"
cpu: "1"
limits:
memory: "2662Mi"
cpu: "1"
volumeMounts:
- name: settings-xml
mountPath: /home/jenkins/.m2/settings.xml
subPath: settings.xml
readOnly: true
- name: m2-repo
mountPath: /home/jenkins/.m2/repository
- name: jnlp
resources:
requests:
memory: "512Mi"
cpu: "200m"
limits:
memory: "512Mi"
cpu: "500m"
volumes:
- name: settings-xml
secret:
secretName: m2-secret-dir
items:
- key: settings.xml
path: settings.xml
- name: m2-repo
emptyDir: {}

View file

@ -0,0 +1,39 @@
apiVersion: v1
kind: Pod
spec:
containers:
- name: cdt
image: quay.io/eclipse-cdt/cdt-infra-eclipse-full@sha256:b892f93d8b2a2acbb6045438f8771790d31b4722040ca815d391b532cc796182
tty: true
args: ["/bin/sh", "-c", "/home/vnc/.vnc/xstartup.sh && cat"]
resources:
requests:
memory: "2Gi"
cpu: "1"
limits:
memory: "2Gi"
cpu: "1"
volumeMounts:
- name: settings-xml
mountPath: /home/jenkins/.m2/settings.xml
subPath: settings.xml
readOnly: true
- name: m2-repo
mountPath: /home/jenkins/.m2/repository
- name: jnlp
resources:
requests:
memory: "512Mi"
cpu: "200m"
limits:
memory: "512Mi"
cpu: "500m"
volumes:
- name: settings-xml
secret:
secretName: m2-secret-dir
items:
- key: settings.xml
path: settings.xml
- name: m2-repo
emptyDir: {}

View file

@ -0,0 +1,39 @@
apiVersion: v1
kind: Pod
spec:
containers:
- name: cdt
image: quay.io/eclipse-cdt/cdt-infra-eclipse-full@sha256:b892f93d8b2a2acbb6045438f8771790d31b4722040ca815d391b532cc796182
tty: true
args: ["/bin/sh", "-c", "/home/vnc/.vnc/xstartup.sh && cat"]
resources:
requests:
memory: "2662Mi"
cpu: "1"
limits:
memory: "2662Mi"
cpu: "1"
volumeMounts:
- name: settings-xml
mountPath: /home/jenkins/.m2/settings.xml
subPath: settings.xml
readOnly: true
- name: m2-repo
mountPath: /home/jenkins/.m2/repository
- name: jnlp
resources:
requests:
memory: "512Mi"
cpu: "200m"
limits:
memory: "512Mi"
cpu: "500m"
volumes:
- name: settings-xml
secret:
secretName: m2-secret-dir
items:
- key: settings.xml
path: settings.xml
- name: m2-repo
emptyDir: {}