forked from eclipse-wildwebdeveloper/wildwebdeveloper
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Jenkinsfile
86 lines (86 loc) · 2.8 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
82
83
84
85
86
pipeline {
options {
timeout(time: 1, unit: 'HOURS')
buildDiscarder(logRotator(numToKeepStr:'10'))
}
agent {
kubernetes {
label 'wildwebdeveloper-buildtest-pod-f33-java11'
defaultContainer 'jnlp'
yaml """
apiVersion: v1
kind: Pod
spec:
containers:
- name: container
image: docker.io/mickaelistria/fedora-gtk3-mutter-java-node:34
imagePullPolicy: Always
tty: true
command: [ "uid_entrypoint", "cat" ]
resources:
limits:
memory: "4Gi"
cpu: "2000m"
requests:
memory: "4Gi"
cpu: "1000m"
- 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
"""
}
}
environment {
NPM_CONFIG_USERCONFIG = "$WORKSPACE/.npmrc"
MAVEN_OPTS="-Xmx1024m"
}
stages {
stage('Prepare-environment') {
steps {
container('container') {
sh 'node --version'
sh 'npm --version'
sh 'npm config set cache="$WORKSPACE/npm-cache"'
}
}
}
stage('Build') {
steps {
container('container') {
wrap([$class: 'Xvnc', useXauthority: true]) {
sh 'mvn clean verify -B -Dtycho.disableP2Mirrors=true -Ddownload.cache.skip=true -Dmaven.test.error.ignore=true -Dmaven.test.failure.ignore=true -PpackAndSign -Dmaven.repo.local=$WORKSPACE/.m2/repository'
}
}
}
post {
always {
junit '*/target/surefire-reports/TEST-*.xml'
archiveArtifacts artifacts: 'repository/target/repository/**,*/target/work/configuration/*.log,*/target/work/data/.metadata/.log,*/target/work/data/languageServers-log/**,org.eclipse.wildwebdeveloper/target/chrome-debug-adapter/chromeDebugAdapter.zip'
}
}
}
stage('Deploy') {
when {
branch 'master'
}
steps {
sshagent ( ['projects-storage.eclipse.org-bot-ssh']) {
sh '''
ssh [email protected] rm -rf /home/data/httpd/download.eclipse.org/wildwebdeveloper/snapshots
ssh [email protected] mkdir -p /home/data/httpd/download.eclipse.org/wildwebdeveloper/snapshots
scp -r repository/target/repository/* [email protected]:/home/data/httpd/download.eclipse.org/wildwebdeveloper/snapshots
ssh [email protected] mkdir -p /home/data/httpd/download.eclipse.org/wildwebdeveloper/snapshots/IDEs
scp -r repository/target/products/*.zip [email protected]:/home/data/httpd/download.eclipse.org/wildwebdeveloper/snapshots/IDEs
scp -r repository/target/products/*.tar.gz [email protected]:/home/data/httpd/download.eclipse.org/wildwebdeveloper/snapshots/IDEs
'''
}
}
}
}
}