This repository has been archived by the owner on Jan 9, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 20
/
Copy pathJenkinsfile
81 lines (81 loc) · 2.16 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 'dartboard-ui-tests'
defaultContainer 'environment'
yaml """
apiVersion: v1
kind: Pod
spec:
containers:
- name: environment
image: jonashungershausen/dartboard-ui-tests:latest
tty: true
command: [ "uid_entrypoint", "cat" ]
resources:
requests:
memory: "2.6Gi"
cpu: "1.3"
limits:
memory: "2.6Gi"
cpu: "1.3"
- name: jnlp
image: 'eclipsecbi/jenkins-jnlp-agent'
volumeMounts:
- mountPath: /home/jenkins/.ssh
name: volume-known-hosts
volumes:
- configMap:
name: known-hosts
name: volume-known-hosts
"""
}
}
options {
timeout(time: 30, unit: 'MINUTES')
buildDiscarder(logRotator(numToKeepStr:'10'))
}
environment {
MAVEN_OPTS="-Xms256m -Xmx2048m"
}
stages {
stage('Prepare') {
steps {
git branch: 'master', url: 'https://github.com/eclipse/dartboard.git'
}
}
stage('Build and test Dartboard') {
steps {
wrap([$class: 'Xvnc', useXauthority: true]) {
sh 'mvn clean verify -Psign -B'
}
}
post {
always {
junit '*/target/surefire-reports/TEST-*.xml'
}
}
}
stage('Deploy to update site') {
steps {
container('jnlp') {
sh 'cp -r org.eclipse.dartboard.update/target/repository org.eclipse.dartboard.update/target/nightly'
sshagent ( ['projects-storage.eclipse.org-bot-ssh']) {
sh '''
ssh genie.dartboard@projects-storage.eclipse.org rm -rf /home/data/httpd/download.eclipse.org/dartboard/nightly
ssh genie.dartboard@projects-storage.eclipse.org mkdir -p /home/data/httpd/download.eclipse.org/dartboard/nightly
scp -r org.eclipse.dartboard.update/target/nightly/ genie.dartboard@projects-storage.eclipse.org:/home/data/httpd/download.eclipse.org/dartboard
'''
}
}
}
}
}
post {
failure {
mail to: 'jonas.hungershausen@vogella.com',
subject: "Failed Pipeline: ${currentBuild.fullDisplayName}",
body: "Something is wrong with ${env.BUILD_URL}"
}
}
}