Skip to content

Commit

Permalink
[Build] Checkout equinox and equinox.binaries repositories side by side
Browse files Browse the repository at this point in the history
  • Loading branch information
HannesWell committed May 2, 2024
1 parent c0b03f6 commit f50e9e0
Showing 1 changed file with 39 additions and 9 deletions.
48 changes: 39 additions & 9 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,25 @@
/*******************************************************************************
* Copyright (c) 2021, 2024 Red Hat Inc. and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
* which accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Mickael Istria (Red Hat Inc.) - initial API and implementation
*******************************************************************************/

def isOnMainIshBranch() {
return env.BRANCH_NAME == ('master') || env.BRANCH_NAME ==~ 'R[0-9]+_[0-9]+_maintenance'
}

pipeline {
options {
skipDefaultCheckout() // Specialiced checkout is performed below
timestamps()
timeout(time: 40, unit: 'MINUTES')
buildDiscarder(logRotator(numToKeepStr:'5'))
disableConcurrentBuilds(abortPrevious: true)
Expand All @@ -12,23 +32,33 @@ pipeline {
jdk 'temurin-jdk17-latest'
}
environment {
EQUINOX_BINARIES_LOC = "$WORKSPACE/rt.equinox.binaries"
EQUINOX_BINARIES_LOC = "$WORKSPACE/equinox.binaries"
}
stages {
stage('get binaries') {
stage('Checkout SCM') {
steps{
dir ('rt.equinox.binaries') {
checkout([$class: 'GitSCM', branches: [[name: '*/master']], doGenerateSubmoduleConfigurations: false, extensions: [[$class: 'CloneOption', timeout: 120]], submoduleCfg: [], userRemoteConfigs: [[url: 'https://github.com/eclipse-equinox/equinox.binaries.git']]])
dir('equinox') {
checkout scm
}
dir('equinox.binaries') {
checkout([$class: 'GitSCM',
branches: [[name: "*/${isOnMainIshBranch() ? env.BRANCH_NAME : 'master'}"]],
doGenerateSubmoduleConfigurations: false,
extensions: [[$class: 'CloneOption', timeout: 120]],
userRemoteConfigs: [[url: 'https://github.com/eclipse-equinox/equinox.binaries.git']]
])
}
}
}
stage('Build') {
steps {
sh """
mvn clean verify --batch-mode --fail-at-end -Dmaven.repo.local=$WORKSPACE/.m2/repository \
-Pbree-libs -Papi-check -Pjavadoc\
-Drt.equinox.binaries.loc=$WORKSPACE/rt.equinox.binaries
"""
dir('equinox') {
sh '''
mvn clean verify --batch-mode --fail-at-end -Dmaven.repo.local=$WORKSPACE/.m2/repository \
-Pbree-libs -Papi-check -Pjavadoc\
-Drt.equinox.binaries.loc=$WORKSPACE/equinox.binaries
'''
}
}
post {
always {
Expand Down

0 comments on commit f50e9e0

Please sign in to comment.