Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-RAN
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
canghaiwuhen
OpenXG-RAN
Commits
27b59812
Commit
27b59812
authored
Sep 13, 2019
by
Raphael Defosseux
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
CI: adding the conditional build stages
Signed-off-by:
Raphael Defosseux
<
raphael.defosseux@eurecom.fr
>
parent
f70d52d0
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
117 additions
and
8 deletions
+117
-8
ci-scripts/Jenkinsfile-gitlab-replay
ci-scripts/Jenkinsfile-gitlab-replay
+117
-8
No files found.
ci-scripts/Jenkinsfile-gitlab-replay
View file @
27b59812
...
...
@@ -31,6 +31,12 @@ def ReplayGitSrcCommit = params.replayGitSrcCommit
def
ReplayGitTgtBranch
=
params
.
replayGitTgtBranch
def
ReplayGitDoMerge
=
params
.
replayGitDoMerge
// Tests that can be replayed
def
ReplayPhySimTests
=
params
.
replayPhySimTests
def
ReplayBasicSimTests
=
params
.
replayBasicSimTests
def
ReplayL2nFAPISimTests
=
params
.
replayL2nFAPISimTests
pipeline
{
agent
{
label
nodeExecutor
...
...
@@ -68,6 +74,15 @@ pipeline {
if
(
params
.
replayGitDoMerge
==
null
)
{
allParametersPresent
=
false
}
if
(
params
.
replayPhySimTests
==
null
)
{
allParametersPresent
=
false
}
if
(
params
.
replayBasicSimTests
==
null
)
{
allParametersPresent
=
false
}
if
(
params
.
replayL2nFAPISimTests
==
null
)
{
allParametersPresent
=
false
}
if
(!
allParametersPresent
)
{
currentBuild
.
result
=
'ABORTED'
error
(
'Stopping early because not enough ReplayGit parameters'
)
...
...
@@ -87,7 +102,27 @@ pipeline {
script
{
checkout
changelog:
false
,
poll:
false
,
scm:
[
$class
:
'GitSCM'
,
branches:
[[
name:
"${ReplayGitSrcBranch}"
]],
doGenerateSubmoduleConfigurations:
false
,
extensions:
[[
$class
:
'CleanBeforeCheckout'
]],
submoduleCfg:
[],
userRemoteConfigs:
[[
url:
'https://gitlab.eurecom.fr/oai/openairinterface5g.git'
]]]
sh
"git checkout -f ${ReplayGitSrcCommit}"
sh
"git log -n1"
echo
" Branch -- ${GIT_BRANCH}"
echo
" Commit -- ${GIT_COMMIT}"
gitCommitAuthorEmailAddr
=
sh
returnStdout:
true
,
script:
'git log -n1 --pretty=format:%ae ${GIT_COMMIT}'
gitCommitAuthorEmailAddr
=
gitCommitAuthorEmailAddr
.
trim
()
echo
"GitLab Usermail is ${gitCommitAuthorEmailAddr}"
if
(
params
.
replayGitDoMerge
)
{
sh
"./ci-scripts/doGitLabMerge.sh --src-branch ${ReplayGitSrcBranch} --src-commit ${ReplayGitSrcCommit} --target-branch ${ReplayGitTgtBranch} --target-commit latest"
}
sh
"zip -r -qq localZip.zip ."
if
(
doFlexranCtrlTest
)
{
sh
"mkdir flexran"
dir
(
'flexran'
)
{
withCredentials
([
[
$class
:
'UsernamePasswordMultiBinding'
,
credentialsId:
"${params.FlexRanRtcGitLabRepository_Credentials}"
,
usernameVariable:
'git_username'
,
passwordVariable:
'git_password'
]
])
{
sh
"git clone https://${git_username}:${git_password}@gitlab.eurecom.fr/flexran/flexran-rtc.git . > ../git_clone.log 2>&1"
}
sh
"sed -i -e 's#add-apt-repository.*cleishm.*neo4j#add-apt-repository ppa:cleishm/neo4j -y#' -e 's#libneo4j-client-dev#libneo4j-client-dev -y#' tools/install_dependencies"
sh
"zip -r -qq flexran.zip ."
}
}
}
}
post
{
...
...
@@ -98,13 +133,87 @@ pipeline {
}
}
}
stage
(
"print latest commit info"
)
{
stage
(
"Start VM -- basic-sim"
)
{
when
{
expression
{
ReplayBasicSimTests
}
}
steps
{
script
{
echo
"Building on: "
echo
" Repository -- ${GIT_URL}"
echo
" Branch -- ${GIT_BRANCH}"
echo
" Commit -- ${GIT_COMMIT}"
timeout
(
time:
5
,
unit:
'MINUTES'
)
{
sh
"./ci-scripts/oai-ci-vm-tool build --workspace $WORKSPACE --variant basic-sim --job-name ${JOB_NAME} --build-id ${BUILD_ID} --daemon"
}
}
}
stage
(
"Start VM -- enb-ethernet"
)
{
when
{
expression
{
ReplayL2nFAPISimTests
}
}
steps
{
timeout
(
time:
5
,
unit:
'MINUTES'
)
{
sh
"./ci-scripts/oai-ci-vm-tool build --workspace $WORKSPACE --variant enb-ethernet --job-name ${JOB_NAME} --build-id ${BUILD_ID} --daemon"
}
}
}
stage
(
"Start VM -- ue-ethernet"
)
{
when
{
expression
{
ReplayL2nFAPISimTests
}
}
steps
{
timeout
(
time:
5
,
unit:
'MINUTES'
)
{
sh
"./ci-scripts/oai-ci-vm-tool build --workspace $WORKSPACE --variant ue-ethernet --job-name ${JOB_NAME} --build-id ${BUILD_ID} --daemon"
}
}
}
stage
(
"Start VM -- phy-sim"
)
{
when
{
expression
{
ReplayPhySimTests
}
}
steps
{
timeout
(
time:
5
,
unit:
'MINUTES'
)
{
sh
"./ci-scripts/oai-ci-vm-tool build --workspace $WORKSPACE --variant phy-sim --job-name ${JOB_NAME} --build-id ${BUILD_ID} --daemon"
}
}
}
stage
(
"Variant Builds"
)
{
parallel
{
stage
(
"Build basic simulator"
)
{
when
{
expression
{
ReplayBasicSimTests
}
}
steps
{
timeout
(
time:
20
,
unit:
'MINUTES'
)
{
sh
"./ci-scripts/oai-ci-vm-tool wait --workspace $WORKSPACE --variant basic-sim --job-name ${JOB_NAME} --build-id ${BUILD_ID} --keep-vm-alive"
}
}
}
stage
(
"Build eNb-ethernet"
)
{
when
{
expression
{
ReplayL2nFAPISimTests
}
}
steps
{
timeout
(
time:
20
,
unit:
'MINUTES'
)
{
sh
"./ci-scripts/oai-ci-vm-tool wait --workspace $WORKSPACE --variant enb-ethernet --job-name ${JOB_NAME} --build-id ${BUILD_ID} --keep-vm-alive"
}
}
}
stage
(
"Build UE-ethernet"
)
{
when
{
expression
{
ReplayL2nFAPISimTests
}
}
steps
{
timeout
(
time:
20
,
unit:
'MINUTES'
)
{
sh
"./ci-scripts/oai-ci-vm-tool wait --workspace $WORKSPACE --variant ue-ethernet --job-name ${JOB_NAME} --build-id ${BUILD_ID} --keep-vm-alive"
}
}
}
stage
(
"Build physical simulators"
)
{
when
{
expression
{
ReplayPhySimTests
}
}
steps
{
timeout
(
time:
20
,
unit:
'MINUTES'
)
{
sh
"./ci-scripts/oai-ci-vm-tool wait --workspace $WORKSPACE --variant phy-sim --job-name ${JOB_NAME} --build-id ${BUILD_ID} --keep-vm-alive"
}
}
}
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment