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
常顺宇
OpenXG-RAN
Commits
0ed77d63
Commit
0ed77d63
authored
Apr 08, 2019
by
Raphael Defosseux
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
CI: simplify master pipeline
Signed-off-by:
Raphael Defosseux
<
raphael.defosseux@eurecom.fr
>
parent
191f11a0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
78 additions
and
221 deletions
+78
-221
ci-scripts/Jenkinsfile-gitlab
ci-scripts/Jenkinsfile-gitlab
+78
-221
No files found.
ci-scripts/Jenkinsfile-gitlab
View file @
0ed77d63
...
...
@@ -408,44 +408,13 @@ pipeline {
stage
(
"Test MONOLITHIC - FDD - Band 7 - B210"
)
{
steps
{
script
{
if
(
"MERGE"
.
equals
(
env
.
gitlabActionType
))
{
gitlabCommitStatus
(
name:
"Test-Mono-FDD-Band7"
)
{
build
job:
'eNB-CI-FDD-Band7-B210'
,
parameters:
[
string
(
name:
'eNB_Repository'
,
value:
String
.
valueOf
(
GIT_URL
)),
string
(
name:
'eNB_Branch'
,
value:
String
.
valueOf
(
env
.
gitlabSourceBranch
)),
string
(
name:
'eNB_CommitID'
,
value:
String
.
valueOf
(
env
.
gitlabMergeRequestLastCommit
)),
booleanParam
(
name:
'eNB_mergeRequest'
,
value:
true
),
string
(
name:
'eNB_TargetBranch'
,
value:
String
.
valueOf
(
env
.
gitlabTargetBranch
))
]
}
}
else
{
gitlabCommitStatus
(
name:
"Test-Mono-FDD-Band7"
)
{
build
job:
'eNB-CI-FDD-Band7-B210'
,
parameters:
[
string
(
name:
'eNB_Repository'
,
value:
String
.
valueOf
(
GIT_URL
)),
string
(
name:
'eNB_Branch'
,
value:
String
.
valueOf
(
GIT_BRANCH
)),
string
(
name:
'eNB_CommitID'
,
value:
String
.
valueOf
(
GIT_COMMIT
)),
booleanParam
(
name:
'eNB_mergeRequest'
,
value:
false
)
]
}
}
triggerSlaveJob
(
'eNB-CI-FDD-Band7-B210'
,
'Test-Mono-FDD-Band7'
)
}
}
post
{
// In case of any non-success, we are retrieving the HTML report of the last completed
// slave job. The only drop-back is that we may retrieve the HTML report of a previous build
always
{
script
{
if
(!
fileExists
(
'test_results-eNB-CI-FDD-Band7-B210.html'
))
{
copyArtifacts
(
projectName:
'eNB-CI-FDD-Band7-B210'
,
filter:
'test_results*.html'
,
selector:
lastCompleted
())
if
(
fileExists
(
'test_results-eNB-CI-FDD-Band7-B210.html'
))
{
sh
"sed -i -e 's#TEMPLATE_BUILD_TIME#${JOB_TIMESTAMP}#' test_results-eNB-CI-FDD-Band7-B210.html"
archiveArtifacts
artifacts:
'test_results-eNB-CI-FDD-Band7-B210.html'
}
}
finalizeSlaveJob
(
'eNB-CI-FDD-Band7-B210'
)
}
}
failure
{
...
...
@@ -458,44 +427,13 @@ pipeline {
stage
(
"Test MONOLITHIC - TDD - Band 40 - B210"
)
{
steps
{
script
{
if
(
"MERGE"
.
equals
(
env
.
gitlabActionType
))
{
gitlabCommitStatus
(
name:
"Test-Mono-TDD-Band40"
)
{
build
job:
'eNB-CI-TDD-Band40-B210'
,
parameters:
[
string
(
name:
'eNB_Repository'
,
value:
String
.
valueOf
(
GIT_URL
)),
string
(
name:
'eNB_Branch'
,
value:
String
.
valueOf
(
env
.
gitlabSourceBranch
)),
string
(
name:
'eNB_CommitID'
,
value:
String
.
valueOf
(
env
.
gitlabMergeRequestLastCommit
)),
booleanParam
(
name:
'eNB_mergeRequest'
,
value:
true
),
string
(
name:
'eNB_TargetBranch'
,
value:
String
.
valueOf
(
env
.
gitlabTargetBranch
))
]
}
}
else
{
gitlabCommitStatus
(
name:
"Test-Mono-TDD-Band40"
)
{
build
job:
'eNB-CI-TDD-Band40-B210'
,
parameters:
[
string
(
name:
'eNB_Repository'
,
value:
String
.
valueOf
(
GIT_URL
)),
string
(
name:
'eNB_Branch'
,
value:
String
.
valueOf
(
GIT_BRANCH
)),
string
(
name:
'eNB_CommitID'
,
value:
String
.
valueOf
(
GIT_COMMIT
)),
booleanParam
(
name:
'eNB_mergeRequest'
,
value:
false
)
]
}
}
triggerSlaveJob
(
'eNB-CI-TDD-Band40-B210'
,
'Test-Mono-TDD-Band40'
)
}
}
post
{
// In case of any non-success, we are retrieving the HTML report of the last completed
// slave job. The only drop-back is that we may retrieve the HTML report of a previous build
always
{
script
{
if
(!
fileExists
(
'test_results-eNB-CI-TDD-Band40-B210.html'
))
{
copyArtifacts
(
projectName:
'eNB-CI-TDD-Band40-B210'
,
filter:
'test_results*.html'
,
selector:
lastCompleted
())
if
(
fileExists
(
'test_results-eNB-CI-TDD-Band40-B210.html'
))
{
sh
"sed -i -e 's#TEMPLATE_BUILD_TIME#${JOB_TIMESTAMP}#' test_results-eNB-CI-TDD-Band40-B210.html"
archiveArtifacts
artifacts:
'test_results-eNB-CI-TDD-Band40-B210.html'
}
}
finalizeSlaveJob
(
'eNB-CI-TDD-Band40-B210'
)
}
}
failure
{
...
...
@@ -508,44 +446,13 @@ pipeline {
stage
(
"Test IF4p5 - FDD - Band 7 - B210"
)
{
steps
{
script
{
if
(
"MERGE"
.
equals
(
env
.
gitlabActionType
))
{
gitlabCommitStatus
(
name:
"Test-IF4p5-FDD-Band7"
)
{
build
job:
'eNB-CI-IF4p5-FDD-Band7-B210'
,
parameters:
[
string
(
name:
'eNB_Repository'
,
value:
String
.
valueOf
(
GIT_URL
)),
string
(
name:
'eNB_Branch'
,
value:
String
.
valueOf
(
env
.
gitlabSourceBranch
)),
string
(
name:
'eNB_CommitID'
,
value:
String
.
valueOf
(
env
.
gitlabMergeRequestLastCommit
)),
booleanParam
(
name:
'eNB_mergeRequest'
,
value:
true
),
string
(
name:
'eNB_TargetBranch'
,
value:
String
.
valueOf
(
env
.
gitlabTargetBranch
))
]
}
}
else
{
gitlabCommitStatus
(
name:
"Test-IF4p5-FDD-Band7"
)
{
build
job:
'eNB-CI-IF4p5-FDD-Band7-B210'
,
parameters:
[
string
(
name:
'eNB_Repository'
,
value:
String
.
valueOf
(
GIT_URL
)),
string
(
name:
'eNB_Branch'
,
value:
String
.
valueOf
(
GIT_BRANCH
)),
string
(
name:
'eNB_CommitID'
,
value:
String
.
valueOf
(
GIT_COMMIT
)),
booleanParam
(
name:
'eNB_mergeRequest'
,
value:
false
)
]
}
}
triggerSlaveJob
(
'eNB-CI-IF4p5-FDD-Band7-B210'
,
'Test-IF4p5-FDD-Band7'
)
}
}
post
{
// In case of any non-success, we are retrieving the HTML report of the last completed
// slave job. The only drop-back is that we may retrieve the HTML report of a previous build
always
{
script
{
if
(!
fileExists
(
'test_results-eNB-CI-IF4p5-FDD-Band7-B210.html'
))
{
copyArtifacts
(
projectName:
'eNB-CI-IF4p5-FDD-Band7-B210'
,
filter:
'test_results*.html'
,
selector:
lastCompleted
())
if
(
fileExists
(
'test_results-eNB-CI-IF4p5-FDD-Band7-B210.html'
))
{
sh
"sed -i -e 's#TEMPLATE_BUILD_TIME#${JOB_TIMESTAMP}#' test_results-eNB-CI-IF4p5-FDD-Band7-B210.html"
archiveArtifacts
artifacts:
'test_results-eNB-CI-IF4p5-FDD-Band7-B210.html'
}
}
finalizeSlaveJob
(
'eNB-CI-IF4p5-FDD-Band7-B210'
)
}
}
failure
{
...
...
@@ -558,44 +465,13 @@ pipeline {
stage
(
"Test IF4p5 - TDD - Band 40 - B210"
)
{
steps
{
script
{
if
(
"MERGE"
.
equals
(
env
.
gitlabActionType
))
{
gitlabCommitStatus
(
name:
"Test-IF4p5-TDD-Band40"
)
{
build
job:
'eNB-CI-IF4p5-TDD-Band40-B210'
,
parameters:
[
string
(
name:
'eNB_Repository'
,
value:
String
.
valueOf
(
GIT_URL
)),
string
(
name:
'eNB_Branch'
,
value:
String
.
valueOf
(
env
.
gitlabSourceBranch
)),
string
(
name:
'eNB_CommitID'
,
value:
String
.
valueOf
(
env
.
gitlabMergeRequestLastCommit
)),
booleanParam
(
name:
'eNB_mergeRequest'
,
value:
true
),
string
(
name:
'eNB_TargetBranch'
,
value:
String
.
valueOf
(
env
.
gitlabTargetBranch
))
]
}
}
else
{
gitlabCommitStatus
(
name:
"Test-IF4p5-TDD-Band40"
)
{
build
job:
'eNB-CI-IF4p5-TDD-Band40-B210'
,
parameters:
[
string
(
name:
'eNB_Repository'
,
value:
String
.
valueOf
(
GIT_URL
)),
string
(
name:
'eNB_Branch'
,
value:
String
.
valueOf
(
GIT_BRANCH
)),
string
(
name:
'eNB_CommitID'
,
value:
String
.
valueOf
(
GIT_COMMIT
)),
booleanParam
(
name:
'eNB_mergeRequest'
,
value:
false
)
]
}
}
triggerSlaveJob
(
'eNB-CI-IF4p5-TDD-Band40-B210'
,
'Test-IF4p5-TDD-Band40'
)
}
}
post
{
// In case of any non-success, we are retrieving the HTML report of the last completed
// slave job. The only drop-back is that we may retrieve the HTML report of a previous build
always
{
script
{
if
(!
fileExists
(
'test_results-eNB-CI-IF4p5-TDD-Band40-B210.html'
))
{
copyArtifacts
(
projectName:
'eNB-CI-IF4p5-TDD-Band40-B210'
,
filter:
'test_results*.html'
,
selector:
lastCompleted
())
if
(
fileExists
(
'test_results-eNB-CI-IF4p5-TDD-Band40-B210.html'
))
{
sh
"sed -i -e 's#TEMPLATE_BUILD_TIME#${JOB_TIMESTAMP}#' test_results-eNB-CI-IF4p5-TDD-Band40-B210.html"
archiveArtifacts
artifacts:
'test_results-eNB-CI-IF4p5-TDD-Band40-B210.html'
}
}
finalizeSlaveJob
(
'eNB-CI-IF4p5-TDD-Band40-B210'
)
}
}
failure
{
...
...
@@ -608,44 +484,13 @@ pipeline {
stage
(
"Test MONOLITHIC - FDD - Band 13 - B210"
)
{
steps
{
script
{
if
(
"MERGE"
.
equals
(
env
.
gitlabActionType
))
{
gitlabCommitStatus
(
name:
"Test-Mono-FDD-Band13"
)
{
build
job:
'eNB-CI-MONO-FDD-Band13-B210'
,
parameters:
[
string
(
name:
'eNB_Repository'
,
value:
String
.
valueOf
(
GIT_URL
)),
string
(
name:
'eNB_Branch'
,
value:
String
.
valueOf
(
env
.
gitlabSourceBranch
)),
string
(
name:
'eNB_CommitID'
,
value:
String
.
valueOf
(
env
.
gitlabMergeRequestLastCommit
)),
booleanParam
(
name:
'eNB_mergeRequest'
,
value:
true
),
string
(
name:
'eNB_TargetBranch'
,
value:
String
.
valueOf
(
env
.
gitlabTargetBranch
))
]
}
}
else
{
gitlabCommitStatus
(
name:
"Test-Mono-FDD-Band13"
)
{
build
job:
'eNB-CI-MONO-FDD-Band13-B210'
,
parameters:
[
string
(
name:
'eNB_Repository'
,
value:
String
.
valueOf
(
GIT_URL
)),
string
(
name:
'eNB_Branch'
,
value:
String
.
valueOf
(
GIT_BRANCH
)),
string
(
name:
'eNB_CommitID'
,
value:
String
.
valueOf
(
GIT_COMMIT
)),
booleanParam
(
name:
'eNB_mergeRequest'
,
value:
false
)
]
}
}
triggerSlaveJob
(
'eNB-CI-MONO-FDD-Band13-B210'
,
'Test-Mono-FDD-Band13'
)
}
}
post
{
// In case of any non-success, we are retrieving the HTML report of the last completed
// slave job. The only drop-back is that we may retrieve the HTML report of a previous build
always
{
script
{
if
(!
fileExists
(
'test_results-eNB-CI-MONO-FDD-Band13-B210.html'
))
{
copyArtifacts
(
projectName:
'eNB-CI-MONO-FDD-Band13-B210'
,
filter:
'test_results*.html'
,
selector:
lastCompleted
())
if
(
fileExists
(
'test_results-eNB-CI-MONO-FDD-Band13-B210.html'
))
{
sh
"sed -i -e 's#TEMPLATE_BUILD_TIME#${JOB_TIMESTAMP}#' test_results-eNB-CI-MONO-FDD-Band13-B210.html"
archiveArtifacts
artifacts:
'test_results-eNB-CI-MONO-FDD-Band13-B210.html'
}
}
finalizeSlaveJob
(
'eNB-CI-MONO-FDD-Band13-B210'
)
}
}
failure
{
...
...
@@ -655,70 +500,19 @@ pipeline {
}
}
}
stage
(
"Test OAI UE
Sniffing - FDD - Band 20
- B200"
)
{
stage
(
"Test OAI UE
- FDD - Bands 20/7
- B200"
)
{
steps
{
script
{
if
(
"MERGE"
.
equals
(
env
.
gitlabActionType
))
{
//gitlabCommitStatus(name: "Test-OAI-UE-FDD-Band20") {
build
job:
'UE-CI-FDD-Band20-B200'
,
parameters:
[
string
(
name:
'eNB_Repository'
,
value:
String
.
valueOf
(
GIT_URL
)),
string
(
name:
'eNB_Branch'
,
value:
String
.
valueOf
(
env
.
gitlabSourceBranch
)),
string
(
name:
'eNB_CommitID'
,
value:
String
.
valueOf
(
env
.
gitlabMergeRequestLastCommit
)),
booleanParam
(
name:
'eNB_mergeRequest'
,
value:
true
),
string
(
name:
'eNB_TargetBranch'
,
value:
String
.
valueOf
(
env
.
gitlabTargetBranch
))
]
//}
}
else
{
//gitlabCommitStatus(name: "Test-OAI-UE-FDD-Band20") {
build
job:
'UE-CI-FDD-Band20-B200'
,
parameters:
[
string
(
name:
'eNB_Repository'
,
value:
String
.
valueOf
(
GIT_URL
)),
string
(
name:
'eNB_Branch'
,
value:
String
.
valueOf
(
GIT_BRANCH
)),
string
(
name:
'eNB_CommitID'
,
value:
String
.
valueOf
(
GIT_COMMIT
)),
booleanParam
(
name:
'eNB_mergeRequest'
,
value:
false
)
]
//}
}
triggerSlaveJobNoGitLab
(
'UE-CI-FDD-Band20-B200'
)
// calling a second job sequentially
if
(
"MERGE"
.
equals
(
env
.
gitlabActionType
))
{
gitlabCommitStatus
(
name:
"Test-eNB-OAI-UE-FDD-Band7"
)
{
build
job:
'eNB-UE-CI-MONO-FDD-Band7-B200'
,
parameters:
[
string
(
name:
'eNB_Repository'
,
value:
String
.
valueOf
(
GIT_URL
)),
string
(
name:
'eNB_Branch'
,
value:
String
.
valueOf
(
env
.
gitlabSourceBranch
)),
string
(
name:
'eNB_CommitID'
,
value:
String
.
valueOf
(
env
.
gitlabMergeRequestLastCommit
)),
booleanParam
(
name:
'eNB_mergeRequest'
,
value:
true
),
string
(
name:
'eNB_TargetBranch'
,
value:
String
.
valueOf
(
env
.
gitlabTargetBranch
))
]
}
}
else
{
gitlabCommitStatus
(
name:
"Test-eNB-OAI-UE-FDD-Band7"
)
{
build
job:
'eNB-UE-CI-MONO-FDD-Band7-B200'
,
parameters:
[
string
(
name:
'eNB_Repository'
,
value:
String
.
valueOf
(
GIT_URL
)),
string
(
name:
'eNB_Branch'
,
value:
String
.
valueOf
(
GIT_BRANCH
)),
string
(
name:
'eNB_CommitID'
,
value:
String
.
valueOf
(
GIT_COMMIT
)),
booleanParam
(
name:
'eNB_mergeRequest'
,
value:
false
)
]
}
}
triggerSlaveJob
(
'eNB-UE-CI-MONO-FDD-Band7-B200'
,
'Test-eNB-OAI-UE-FDD-Band7'
)
}
}
post
{
// In case of any non-success, we are retrieving the HTML report of the last completed
// slave job. The only drop-back is that we may retrieve the HTML report of a previous build
always
{
script
{
if
(!
fileExists
(
'test_results-eNB-UE-CI-MONO-FDD-Band7-B200.html'
))
{
copyArtifacts
(
projectName:
'eNB-UE-CI-MONO-FDD-Band7-B200'
,
filter:
'test_results*.html'
,
selector:
lastCompleted
())
if
(
fileExists
(
'test_results-eNB-UE-CI-MONO-FDD-Band7-B200.html'
))
{
sh
"sed -i -e 's#TEMPLATE_BUILD_TIME#${JOB_TIMESTAMP}#' test_results-eNB-UE-CI-MONO-FDD-Band7-B200.html"
archiveArtifacts
artifacts:
'test_results-eNB-UE-CI-MONO-FDD-Band7-B200.html'
}
}
finalizeSlaveJob
(
'UE-CI-FDD-Band20-B200'
)
finalizeSlaveJob
(
'eNB-UE-CI-MONO-FDD-Band7-B200'
)
}
}
failure
{
...
...
@@ -806,3 +600,66 @@ OAI CI Team''',
}
}
}
// ---- Slave Job functions
def
triggerSlaveJob
(
jobName
,
gitlabStatusName
)
{
if
(
"MERGE"
.
equals
(
env
.
gitlabActionType
))
{
gitlabCommitStatus
(
name:
gitlabStatusName
)
{
build
job:
jobName
,
parameters:
[
string
(
name:
'eNB_Repository'
,
value:
String
.
valueOf
(
GIT_URL
)),
string
(
name:
'eNB_Branch'
,
value:
String
.
valueOf
(
env
.
gitlabSourceBranch
)),
string
(
name:
'eNB_CommitID'
,
value:
String
.
valueOf
(
env
.
gitlabMergeRequestLastCommit
)),
booleanParam
(
name:
'eNB_mergeRequest'
,
value:
true
),
string
(
name:
'eNB_TargetBranch'
,
value:
String
.
valueOf
(
env
.
gitlabTargetBranch
))
]
}
}
else
{
gitlabCommitStatus
(
name:
gitlabStatusName
)
{
build
job:
jobName
,
parameters:
[
string
(
name:
'eNB_Repository'
,
value:
String
.
valueOf
(
GIT_URL
)),
string
(
name:
'eNB_Branch'
,
value:
String
.
valueOf
(
GIT_BRANCH
)),
string
(
name:
'eNB_CommitID'
,
value:
String
.
valueOf
(
GIT_COMMIT
)),
booleanParam
(
name:
'eNB_mergeRequest'
,
value:
false
)
]
}
}
}
def
triggerSlaveJobNoGitLab
(
jobName
)
{
if
(
"MERGE"
.
equals
(
env
.
gitlabActionType
))
{
build
job:
jobName
,
parameters:
[
string
(
name:
'eNB_Repository'
,
value:
String
.
valueOf
(
GIT_URL
)),
string
(
name:
'eNB_Branch'
,
value:
String
.
valueOf
(
env
.
gitlabSourceBranch
)),
string
(
name:
'eNB_CommitID'
,
value:
String
.
valueOf
(
env
.
gitlabMergeRequestLastCommit
)),
booleanParam
(
name:
'eNB_mergeRequest'
,
value:
true
),
string
(
name:
'eNB_TargetBranch'
,
value:
String
.
valueOf
(
env
.
gitlabTargetBranch
))
]
}
else
{
build
job:
jobName
,
parameters:
[
string
(
name:
'eNB_Repository'
,
value:
String
.
valueOf
(
GIT_URL
)),
string
(
name:
'eNB_Branch'
,
value:
String
.
valueOf
(
GIT_BRANCH
)),
string
(
name:
'eNB_CommitID'
,
value:
String
.
valueOf
(
GIT_COMMIT
)),
booleanParam
(
name:
'eNB_mergeRequest'
,
value:
false
)
]
}
}
def
finalizeSlaveJob
(
jobName
)
{
// In case of any non-success, we are retrieving the HTML report of the last completed
// slave job. The only drop-back is that we may retrieve the HTML report of a previous build
fileName
=
"test_results-${jobName}.html"
if
(!
fileExists
(
fileName
))
{
copyArtifacts
(
projectName:
jobName
,
filter:
'test_results*.html'
,
selector:
lastCompleted
())
if
(
fileExists
(
fileName
))
{
sh
"sed -i -e 's#TEMPLATE_BUILD_TIME#${JOB_TIMESTAMP}#' ${fileName}"
archiveArtifacts
artifacts:
fileName
}
}
}
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