1- pipeline {
2- agent { label ' migration' }
3- tools {
4- maven ' apache-maven-latest'
5- jdk ' openjdk-jdk11 -latest'
6- }
7- environment {
8- FROM_PR = " ${ BRANCH_NAME} " . contains(" PR-" );
9-
10- BUILD_KEY = " ${ BRANCH_NAME} -${ BUILD_ID} " . replaceFirst(/ ^v/ , " " ). replaceAll(' /' ,' -' );
11- SUB_BRANCH = " ${ FROM_PR} " . replace(" true" , " ${ CHANGE_TARGET} " ). replace(" false" , " ${ BRANCH_NAME} " );
12-
13- SSH_ACCOUNT = " genie.diffmerge@projects-storage.eclipse.org"
14- BUILD_DIR = " /home/data/httpd/download.eclipse.org/diffmerge/nightly/${ BUILD_KEY} "
15-
16- NIGHTLY_KEY = " ${ BRANCH_NAME} " . replaceFirst(/ ^v/ , " " ). replaceAll(' /' ,' -' );
17- NIGHTLY_DIR = " /home/data/httpd/download.eclipse.org/diffmerge/nightly/${ NIGHTLY_KEY} "
18- }
19- stages {
20- stage(' Package' ) {
21- steps {
22- sh ' env'
23- wrap([$class : ' Xvnc' , takeScreenshot : false , useXauthority : true ]) {
24- sh ' mvn clean install -t ${WORKSPACE}/releng/org.eclipse.emf.diffmerge.configuration/toolchains-hipp.xml -Psign -Pstandalone -Pgui.test'
25- junit allowEmptyResults : true , testResults : ' **/target/surefire-reports/TEST-*.xml'
26- }
27- }
28- }
29- stage(' Publish artifacts' ) {
30- steps {
31- sshagent ( [' projects-storage.eclipse.org-bot-ssh' ]) {
32- sh " ssh $SSH_ACCOUNT mkdir -p $BUILD_DIR /emf-diffmerge-site"
33- sh " scp -rp $WORKSPACE /releng/org.eclipse.emf.diffmerge.update/target/repository/* $SSH_ACCOUNT :$BUILD_DIR /emf-diffmerge-site"
34-
35- sh " ssh $SSH_ACCOUNT mkdir -p $BUILD_DIR /standalone"
36- sh " scp -rp $WORKSPACE /releng/org.eclipse.emf.diffmerge.update/target/standalone/*dependencies*.jar $SSH_ACCOUNT :$BUILD_DIR /standalone/"
37- }
38- script {
39- currentBuild. description = " ${ BUILD_KEY} - <a href=\" https://download.eclipse.org/diffmerge/nightly/${ BUILD_KEY} \" >site</a>"
40- }
41- }
42- }
43- stage(' Publish nightly' ) {
44- when {
45- expression {
46- ! " ${ BRANCH_NAME} " . contains(' PR-' )
47- }
48- }
49- steps {
50- sshagent ( [' projects-storage.eclipse.org-bot-ssh' ]) {
51- sh " ssh ${ SSH_ACCOUNT} mkdir -p ${ NIGHTLY_DIR} "
52- sh " ssh ${ SSH_ACCOUNT} rm -rf ${ NIGHTLY_DIR} /emf-diffmerge-site"
53- sh " ssh ${ SSH_ACCOUNT} cp -r ${ BUILD_DIR} /emf-diffmerge-site ${ NIGHTLY_DIR} "
54- sh " ssh ${ SSH_ACCOUNT} rm -rf ${ NIGHTLY_DIR} /standalone"
55- sh " ssh ${ SSH_ACCOUNT} cp -r ${ BUILD_DIR} /standalone ${ NIGHTLY_DIR} "
56- }
57- }
58- }
59- stage(' Trigger childs' ) {
60- steps {
61- build job : " diffmerge-coevolution/${ SUB_BRANCH} " , parameters : [string(name : ' CORE_BRANCH' , value :" ${ BUILD_KEY} " )], wait : false
62- build job : " diffmerge-patterns/${ SUB_BRANCH} " , parameters : [string(name : ' CORE_BRANCH' , value :" ${ BUILD_KEY} " )], wait : false
63- }
64- }
65- }
66-
67- post {
68- always {
69- archiveArtifacts artifacts : ' **/*.log, *.log, **/*.xml, *.exec' , allowEmptyArchive : true
70- }
71- }
1+ pipeline {
2+ agent { label ' migration' }
3+ tools {
4+ maven ' apache-maven-latest'
5+ jdk ' openjdk-jdk17 -latest'
6+ }
7+ environment {
8+ FROM_PR = " ${ BRANCH_NAME} " . contains(" PR-" );
9+
10+ BUILD_KEY = " ${ BRANCH_NAME} -${ BUILD_ID} " . replaceFirst(/ ^v/ , " " ). replaceAll(' /' ,' -' );
11+ SUB_BRANCH = " ${ FROM_PR} " . replace(" true" , " ${ CHANGE_TARGET} " ). replace(" false" , " ${ BRANCH_NAME} " );
12+
13+ SSH_ACCOUNT = " genie.diffmerge@projects-storage.eclipse.org"
14+ BUILD_DIR = " /home/data/httpd/download.eclipse.org/diffmerge/nightly/${ BUILD_KEY} "
15+
16+ NIGHTLY_KEY = " ${ BRANCH_NAME} " . replaceFirst(/ ^v/ , " " ). replaceAll(' /' ,' -' );
17+ NIGHTLY_DIR = " /home/data/httpd/download.eclipse.org/diffmerge/nightly/${ NIGHTLY_KEY} "
18+ }
19+ stages {
20+ stage(' Package' ) {
21+ steps {
22+ sh ' env'
23+ wrap([$class : ' Xvnc' , takeScreenshot : false , useXauthority : true ]) {
24+ sh ' mvn clean install -t ${WORKSPACE}/releng/org.eclipse.emf.diffmerge.configuration/toolchains-hipp.xml -Psign -Pstandalone -Pgui.test'
25+ junit allowEmptyResults : true , testResults : ' **/target/surefire-reports/TEST-*.xml'
26+ }
27+ }
28+ }
29+ stage(' Publish artifacts' ) {
30+ steps {
31+ sshagent ( [' projects-storage.eclipse.org-bot-ssh' ]) {
32+ sh " ssh $SSH_ACCOUNT mkdir -p $BUILD_DIR /emf-diffmerge-site"
33+ sh " scp -rp $WORKSPACE /releng/org.eclipse.emf.diffmerge.update/target/repository/* $SSH_ACCOUNT :$BUILD_DIR /emf-diffmerge-site"
34+
35+ sh " ssh $SSH_ACCOUNT mkdir -p $BUILD_DIR /standalone"
36+ sh " scp -rp $WORKSPACE /releng/org.eclipse.emf.diffmerge.update/target/standalone/*dependencies*.jar $SSH_ACCOUNT :$BUILD_DIR /standalone/"
37+ }
38+ script {
39+ currentBuild. description = " ${ BUILD_KEY} - <a href=\" https://download.eclipse.org/diffmerge/nightly/${ BUILD_KEY} \" >site</a>"
40+ }
41+ }
42+ }
43+ stage(' Publish nightly' ) {
44+ when {
45+ expression {
46+ ! " ${ BRANCH_NAME} " . contains(' PR-' )
47+ }
48+ }
49+ steps {
50+ sshagent ( [' projects-storage.eclipse.org-bot-ssh' ]) {
51+ sh " ssh ${ SSH_ACCOUNT} mkdir -p ${ NIGHTLY_DIR} "
52+ sh " ssh ${ SSH_ACCOUNT} rm -rf ${ NIGHTLY_DIR} /emf-diffmerge-site"
53+ sh " ssh ${ SSH_ACCOUNT} cp -r ${ BUILD_DIR} /emf-diffmerge-site ${ NIGHTLY_DIR} "
54+ sh " ssh ${ SSH_ACCOUNT} rm -rf ${ NIGHTLY_DIR} /standalone"
55+ sh " ssh ${ SSH_ACCOUNT} cp -r ${ BUILD_DIR} /standalone ${ NIGHTLY_DIR} "
56+ }
57+ }
58+ }
59+ stage(' Trigger childs' ) {
60+ steps {
61+ build job : " diffmerge-coevolution/${ SUB_BRANCH} " , parameters : [string(name : ' CORE_BRANCH' , value :" ${ BUILD_KEY} " )], wait : false
62+ build job : " diffmerge-patterns/${ SUB_BRANCH} " , parameters : [string(name : ' CORE_BRANCH' , value :" ${ BUILD_KEY} " )], wait : false
63+ }
64+ }
65+ }
66+
67+ post {
68+ always {
69+ archiveArtifacts artifacts : ' **/*.log, *.log, **/*.xml, *.exec' , allowEmptyArchive : true
70+ }
71+ }
7272}
0 commit comments