mirror of
https://gitlab.eurecom.fr/oai/openairinterface5g.git
synced 2026-07-13 04:30:28 +00:00
CI: pass pre-computed branch from orchestrator to downstream jobs
Jenkinsfile-GitLab-Container now constructs CI testing branch as
{sourceBranch}-{sourceCommit} and passes it explicitly to all downstream
jobs. Both Jenkinsfile and Jenkinsfile-push-local-repo consume it via
params.branch instead of independently reconstructing the name, ensuring
that the branch pushed by RAN-Local-Repo-Push and the branch checked out
by test jobs are always identical.
Signed-off-by: Jaroslava Fiedlerova <jaroslava.fiedlerova@openairinterface.org>
This commit is contained in:
11
ci-scripts/Jenkinsfile
vendored
11
ci-scripts/Jenkinsfile
vendored
@@ -20,13 +20,11 @@ if (params.LockResources != null && params.LockResources.trim().length() > 0)
|
||||
// Global Parameters. Normally they should be populated when the master job
|
||||
// triggers the slave job with parameters
|
||||
|
||||
def INTERNAL_REPO = "asterix:/home/git/openairinterface5g.git"
|
||||
def sourceBranch = params.sourceBranch ?: env.GIT_BRANCH
|
||||
def targetBranch = params.targetBranch ?: 'develop'
|
||||
def commitID = params.sourceCommit ?: env.GIT_COMMIT
|
||||
def testRepository = params.customRepository ?: INTERNAL_REPO
|
||||
def testBranch = params.customBranch ?: "${sourceBranch}-${commitID}"
|
||||
def testRepository = params.repository ?: 'git@asterix:/home/git/openairinterface5g.git'
|
||||
def testBranch = params.branch ?: 'develop'
|
||||
def mergeWithTarget = params.mergeWithTarget ?: false
|
||||
def sourceBranch = params.sourceBranch ?: testBranch
|
||||
|
||||
def flexricOption = ""
|
||||
def runWithOC = false
|
||||
@@ -113,8 +111,7 @@ pipeline {
|
||||
}
|
||||
sh """
|
||||
python3 main.py --mode=InitiateHtml --repository=${testRepository} \
|
||||
--branch=${testBranch} --commitID=${commitID} \
|
||||
${mainPythonAllXmlFiles}
|
||||
--branch=${testBranch} ${mainPythonAllXmlFiles}
|
||||
"""
|
||||
if (runWithOC) {
|
||||
withCredentials([usernamePassword(credentialsId: "${params.OC_Credentials}", usernameVariable: 'OC_Username', passwordVariable: 'OC_Password')]) {
|
||||
|
||||
Reference in New Issue
Block a user