Skip to content

Commit

Permalink
[releng] Add Jenkinsfile
Browse files Browse the repository at this point in the history
Change-Id: If30698547ab2b2b9495e7a9f2492a62ce25d047f
Signed-off-by: Philippe DUL <[email protected]>
  • Loading branch information
pdulth committed Jul 20, 2021
1 parent fc61170 commit f40b57f
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
pipeline {
agent { label 'migration' }
tools {
maven 'apache-maven-latest'
jdk 'oracle-jdk8-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}-patterns".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.patterns.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-patterns-site"
sh "scp -rp $WORKSPACE/releng/org.eclipse.emf.diffmerge.patterns.update/target/repository/* $SSH_ACCOUNT:$BUILD_DIR/edm-patterns-site"
}
script {
currentBuild.description = "${BUILD_KEY} - <a href=\"https://download.eclipse.org/diffmerge/nightly/${BUILD_KEY}\">site</a>"
}
}
}
}
}

0 comments on commit f40b57f

Please sign in to comment.