diff --git a/.gitmodules b/.gitmodules index ca90588770a82157f85630d2b5083dded841ea7c..fe521efc68bff3e1a1bcd10987ca17d9b5fd1129 100644 --- a/.gitmodules +++ b/.gitmodules @@ -7,3 +7,6 @@ [submodule "component/oai-upf-equivalent"] path = component/oai-upf-equivalent url = https://github.com/OPENAIRINTERFACE/openair-spgwu-tiny.git +[submodule "component/oai-nrf"] + path = component/oai-nrf + url = https://gitlab.eurecom.fr/oai/cn5g/oai-cn5g-nrf.git diff --git a/ci-scripts/Jenkinsfile-GitLab-Docker b/ci-scripts/Jenkinsfile-GitLab-Docker index 4b2a8e7aa9aaa5d4e0635809f30a39507418fb6f..dcc19571cbd634ad4b1cbba1822008da68351ec6 100644 --- a/ci-scripts/Jenkinsfile-GitLab-Docker +++ b/ci-scripts/Jenkinsfile-GitLab-Docker @@ -57,6 +57,8 @@ def scmEvent = false def upstreamEvent = false // Default tags / branches --> could be passed on by upstream job or by PR content +def nrfTag = 'develop' +def nrfBranch = 'develop' def amfTag = 'develop' def amfBranch = 'develop' def smfTag = 'develop' @@ -136,6 +138,14 @@ pipeline { } if (upstreamEvent) { + if (params.NRF_TAG != null) { + nrfTag = params.NRF_TAG + echo "Upstream Job passed NRF_TAG to use: ${nrfTag}" + } + if (params.NRF_BRANCH != null) { + nrfBranch = params.NRF_BRANCH + echo "Upstream Job passed NRF_BRANCH to use: ${nrfBranch}" + } if (params.AMF_TAG != null) { amfTag = params.AMF_TAG echo "Upstream Job passed AMF_TAG to use: ${amfTag}" @@ -157,13 +167,13 @@ pipeline { sh 'git checkout -f ' + upstreamTagToUse sh "zip -r -qq oai-cn5g-fed.zip .git" sh "mkdir -p archives DS-TEST-RESULTS" - sh './scripts/syncComponents.sh --amf-branch ' + amfBranch + ' --smf-branch ' + smfBranch + ' --spgwu-tiny-branch ' + spgwuBranch + sh './scripts/syncComponents.sh --nrf-branch ' + nrfBranch + ' --amf-branch ' + amfBranch + ' --smf-branch ' + smfBranch + ' --spgwu-tiny-branch ' + spgwuBranch if (new_host_flag) { // Prepare the workspace in remote server copyTo2ndServer('oai-cn5g-fed.zip', new_host_flag, new_host_user, new_host) myShCmd('git clean -x -d -f > /dev/null 2>&1', new_host_flag, new_host_user, new_host) myShCmd('mkdir -p archives DS-TEST-RESULTS', new_host_flag, new_host_user, new_host) - myShCmd('./scripts/syncComponents.sh --amf-branch ' + amfBranch + ' --smf-branch ' + smfBranch, new_host_flag, new_host_user, new_host) + myShCmd('./scripts/syncComponents.sh --nrf-branch ' + nrfBranch + ' --amf-branch ' + amfBranch + ' --smf-branch ' + smfBranch, new_host_flag, new_host_user, new_host) } } if (scmEvent) { @@ -187,7 +197,7 @@ pipeline { } if ((!upstreamEvent) && (!scmEvent)) { sh "git clean -x -d -f > /dev/null 2>&1" - sh './scripts/syncComponents.sh --amf-branch ' + amfBranch + ' --smf-branch ' + smfBranch + ' --spgwu-tiny-branch ' + spgwuBranch + sh './scripts/syncComponents.sh --nrf-branch ' + nrfBranch + ' --amf-branch ' + amfBranch + ' --smf-branch ' + smfBranch + ' --spgwu-tiny-branch ' + spgwuBranch sh "mkdir -p archives DS-TEST-RESULTS" } } diff --git a/component/oai-nrf b/component/oai-nrf new file mode 160000 index 0000000000000000000000000000000000000000..738473e2d16d78569acb8ded41a363bac8c0deeb --- /dev/null +++ b/component/oai-nrf @@ -0,0 +1 @@ +Subproject commit 738473e2d16d78569acb8ded41a363bac8c0deeb diff --git a/scripts/syncComponents.sh b/scripts/syncComponents.sh index d146956d82ed9c90ba70f004e3cbfbe11672f63e..72685d56945c73500503681837fa27744e76e2bc 100755 --- a/scripts/syncComponents.sh +++ b/scripts/syncComponents.sh @@ -36,6 +36,9 @@ function usage { echo "" echo "Options:" echo "--------" + echo " --nrf-branch ####" + echo " Specify the source branch for the OAI-NRF component" + echo "" echo " --amf-branch ####" echo " Specify the source branch for the OAI-AMF component" echo "" @@ -50,6 +53,7 @@ function usage { echo "" } +NRF_BRANCH='develop' AMF_BRANCH='develop' SMF_BRANCH='develop' SPGWU_BRANCH='master' @@ -66,6 +70,12 @@ case $key in usage exit 0 ;; + --nrf-branch) + NRF_BRANCH="$2" + doDefault=0 + shift + shift + ;; --amf-branch) AMF_BRANCH="$2" doDefault=0 @@ -94,6 +104,7 @@ esac done echo "---------------------------------------------------------" +echo "OAI-NRF component branch : ${NRF_BRANCH}" echo "OAI-AMF component branch : ${AMF_BRANCH}" echo "OAI-SMF component branch : ${SMF_BRANCH}" echo "OAI-SPGW-U component branch : ${SPGWU_BRANCH}" @@ -112,6 +123,11 @@ if [ $doDefault -eq 1 ] then git submodule foreach 'git fetch --prune && git checkout develop && git pull origin develop' > /dev/null 2>&1 else + pushd component/oai-nrf + git fetch --prune > /dev/null 2>&1 + git checkout $NRF_BRANCH > /dev/null 2>&1 + git pull origin $NRF_BRANCH > /dev/null 2>&1 + popd pushd component/oai-amf git fetch --prune > /dev/null 2>&1 git checkout $AMF_BRANCH > /dev/null 2>&1