-
Notifications
You must be signed in to change notification settings - Fork 4
/
Jenkinsfile
81 lines (81 loc) · 1.78 KB
/
Jenkinsfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
pipeline {
agent {
kubernetes {
label 'rcptt-extention-ecl-build-agent'
yaml """
apiVersion: v1
kind: Pod
spec:
containers:
- name: ubuntu
image: dudaevar/ubuntu-rcptt
tty: true
resources:
limits:
memory: "2Gi"
cpu: "1"
requests:
memory: "2Gi"
cpu: "1"
volumeMounts:
- name: settings-xml
mountPath: /home/jenkins/.m2/settings.xml
subPath: settings.xml
readOnly: true
- name: toolchains-xml
mountPath: /home/jenkins/.m2/toolchains.xml
subPath: toolchains.xml
readOnly: true
- name: m2-repo
mountPath: /home/jenkins/.m2/repository
volumes:
- name: settings-xml
configMap:
name: m2-dir
items:
- key: settings.xml
path: settings.xml
- name: toolchains-xml
configMap:
name: m2-dir
items:
- key: toolchains.xml
path: toolchains.xml
- name: m2-repo
emptyDir: {}
"""
}
}
stages {
stage('Checkout'){
steps {
checkout scm
}
}
stage('Build'){
steps {
container('ubuntu') {
sh 'mvn clean verify -X -Dmaven.repo.local=$WORKSPACE/m2 -e'
}
}
}
stage('Archive'){
steps {
archiveArtifacts allowEmptyArchive: true, artifacts: 'runtime/repository/org.eclipse.rcptt.extensions.runtime.site/target/repository/**/*'
}
}
stage('Tests'){
steps {
container('ubuntu') {
sh './tests/run_tests.sh'
}
}
}
}
post {
always {
junit 'tests/**/target/*-reports/*.xml'
archiveArtifacts allowEmptyArchive: true, artifacts: 'tests/**/target/results/**/*, tests/**/target/**/*err*log, tests/**/target/runner-workspace/**/*, tests/**/target/**/.log'
}
}
}