-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathJenkinsfile
40 lines (39 loc) · 1.57 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
pipeline {
agent { label 'migration' }
tools {
maven 'apache-maven-latest'
jdk 'openjdk-jdk11-latest'
}
parameters {
string(name: 'CORE_BRANCH', defaultValue: 'master', description: 'When build is not triggered by diffmerge-core build, set the branch of diffmerge-core')
}
environment {
FROM_GITHUB = "${BRANCH_NAME}".contains("PR-");
BUILD_KEY = "${params.CORE_BRANCH}-${BRANCH_NAME}-${BUILD_ID}-coevolution".replaceFirst(/^v/, "").replaceAll('/','-');
SSH_ACCOUNT = "[email protected]"
BUILD_DIR = "/home/data/httpd/download.eclipse.org/diffmerge/nightly/${BUILD_KEY}"
}
stages {
stage('Package') {
steps {
sh "mvn -Dcore.repo.url=https://download.eclipse.org/diffmerge/nightly/${params.CORE_BRANCH}/emf-diffmerge-site/ clean install -t ${WORKSPACE}/releng/org.eclipse.emf.diffmerge.coevolution.configuration/toolchains-hipp.xml -Psign"
}
}
stage('Publish artifacts') {
steps {
sshagent ( ['projects-storage.eclipse.org-bot-ssh']) {
sh "ssh $SSH_ACCOUNT mkdir -p $BUILD_DIR/edm-coevolution-site"
sh "scp -rp $WORKSPACE/releng/org.eclipse.emf.diffmerge.coevolution.update/target/repository/* $SSH_ACCOUNT:$BUILD_DIR/edm-coevolution-site"
}
script {
currentBuild.description = "${BUILD_KEY} - <a href=\"https://download.eclipse.org/diffmerge/nightly/${BUILD_KEY}\">site</a>"
}
}
}
}
post {
always {
archiveArtifacts artifacts: '**/*.log, *.log, *.exec', allowEmptyArchive: true
}
}
}