-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathJenkinsfile
37 lines (37 loc) · 1.12 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
pipeline {
agent any
options {
disableConcurrentBuilds()
timeout(time: 10, unit: 'MINUTES')
}
tools {
maven 'apache-maven-3.9.6'
jdk 'openjdk-jdk17-latest'
}
environment {
LOGIN = 'genie.cbi@projects-storage.eclipse.org'
SITE_DIR = '/home/data/httpd/download.eclipse.org/cbi/cbi-tycho-example/updatesite'
}
stages {
stage('Build') {
steps {
sh 'mvn clean verify -Prelease -B'
}
}
stage('Deploy') {
steps {
sshagent(['projects-storage.eclipse.org-bot-ssh']) {
sh """
echo "Deploying..."
#check if dir already exists
if ssh ${LOGIN} test -d ${SITE_DIR}; then
ssh ${LOGIN} rm -rf ${SITE_DIR}
fi
ssh ${login} mkdir -p ${SITE_DIR}
scp -r org.eclipse.cbi.tycho.example.updatesite/target/repository ${LOGIN}:${SITE_DIR}
"""
}
}
}
}
}