forked from eclipse-capella/capella-xhtml-docgen
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathJenkinsfile
48 lines (45 loc) · 1.63 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
pipeline {
agent { label 'migration' }
tools {
maven 'apache-maven-latest'
jdk 'oracle-jdk8-latest'
}
stages {
stage('Generate TP') {
steps {
sh 'mvn verify -e -f releng/org.polarsys.capella.docgen.target/pom.xml'
}
}
stage('Package docgen addon') {
steps {
sh 'mvn clean install -e -f pom.xml'
}
}
stage('Archive artifacts') {
steps {
archiveArtifacts artifacts: 'releng/org.polarsys.capella.docgen.site/target/CapellaXHTMLDocGen-*.zip, releng/org.polarsys.capella.docgen.site/target/repository/**'
}
}
stage('Deploy') {
when {
not { changeRequest() }
}
steps {
sshagent ( ['projects-storage.eclipse.org-bot-ssh']) {
sh '''
PROMOTED_SRC="releng/org.polarsys.capella.docgen.site/target/repository/*"
PROMOTED_DST="/home/data/httpd/download.eclipse.org/capella/addons/xhtmldocgen/updates/nightly/master/"
ssh [email protected] rm -fr $PROMOTED_DST
ssh [email protected] mkdir -p $PROMOTED_DST
scp -r $PROMOTED_SRC [email protected]:$PROMOTED_DST
PROMOTED_SRC="releng/org.polarsys.capella.docgen.site/target/*-dropins.zip"
PROMOTED_DST="/home/data/httpd/download.eclipse.org/capella/addons/xhtmldocgen/dropins/nightly/master/"
ssh [email protected] rm -fr $PROMOTED_DST
ssh [email protected] mkdir -p $PROMOTED_DST
scp -r $PROMOTED_SRC [email protected]:$PROMOTED_DST
'''
}
}
}
}
}