| pipeline { |
| options { |
| timeout(time: 90, unit: 'MINUTES') |
| buildDiscarder(logRotator(numToKeepStr:'5')) |
| } |
| agent { |
| kubernetes { |
| label 'linuxtools-buildtest-pod-' + env.BUILD_NUMBER |
| defaultContainer 'jnlp' |
| yaml """ |
| apiVersion: v1 |
| kind: Pod |
| spec: |
| containers: |
| - name: container |
| image: akurtakov/linuxtools-build-test-dependencies@sha256:0fa85fc43a35ca97fcbc650a012f348383a1f90514a837503160c80658e456ca |
| tty: true |
| command: [ "uid_entrypoint", "cat" ] |
| resources: |
| requests: |
| memory: "2Gi" |
| cpu: "1" |
| limits: |
| memory: "2Gi" |
| cpu: "1" |
| - name: jnlp |
| image: 'eclipsecbi/jenkins-jnlp-agent' |
| volumeMounts: |
| - name: volume-known-hosts |
| mountPath: /home/jenkins/.ssh |
| - name: settings-xml |
| mountPath: /home/jenkins/.m2/settings.xml |
| subPath: settings.xml |
| readOnly: true |
| - name: m2-repo |
| mountPath: /home/jenkins/.m2/repository |
| 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: {} |
| """ |
| } |
| } |
| environment { |
| MAVEN_OPTS = "-Xmx2G" |
| JAVA_HOME = "/usr/lib/jvm/java-11-openjdk" |
| } |
| stages { |
| stage('Prepare-environment') { |
| steps { |
| container('container') { |
| sh 'mutter --replace --sm-disable &' |
| checkout([$class: 'GitSCM', branches: [[name: 'FETCH_HEAD']], doGenerateSubmoduleConfigurations: false, extensions: [], submoduleCfg: [], userRemoteConfigs: [[refspec: '${GERRIT_REFSPEC}', url: 'https://git.eclipse.org/r/linuxtools/org.eclipse.linuxtools.git']]]) |
| } |
| } |
| } |
| stage('Build') { |
| steps { |
| container('container') { |
| wrap([$class: 'Xvnc', useXauthority: true]) { |
| sh 'mvn clean verify -Dmaven.test.failure.ignore=true' |
| } |
| } |
| } |
| post { |
| always { |
| junit '**/*.test*/target/surefire-reports/*.xml' |
| archiveArtifacts artifacts: '**/*.log,**/*.html,**/screenshots/*.png' |
| } |
| } |
| } |
| } |
| } |