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
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
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
OpenXG-RAN
Commits
3b557060
Commit
3b557060
authored
Sep 01, 2021
by
hardy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
writing the status to SQL DB + stage exec on 2 agents
parent
11477c7a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
3 deletions
+32
-3
ci-scripts/Jenkinsfile-tmp-multi-enb-nsa
ci-scripts/Jenkinsfile-tmp-multi-enb-nsa
+32
-3
No files found.
ci-scripts/Jenkinsfile-tmp-multi-enb-nsa
View file @
3b557060
...
...
@@ -24,6 +24,7 @@
// Location of the python executor node shall be in the same subnet as the others servers
def
pythonExecutor
=
params
.
pythonExecutor
def
DataBaseHost
=
params
.
DataBaseHost
// Location of the test XML file to be run
def
testXMLFile
=
params
.
pythonTestXmlFile
...
...
@@ -45,15 +46,20 @@ def eNB_CommitID
def
eNB_AllowMergeRequestProcess
def
eNB_TargetBranch
//Status fed to the database
def
StatusForDb
=
""
pipeline
{
agent
{
label
pythonExecutor
}
agent
none
options
{
disableConcurrentBuilds
()
ansiColor
(
'xterm'
)
lock
(
extra:
[[
resource:
ciSmartPhonesResource2
]],
resource:
ciSmartPhonesResource1
)
}
stages
{
stage
(
"Py Exec"
){
agent
{
label
pythonExecutor
}
stages
{
stage
(
"Build Init"
)
{
steps
{
...
...
@@ -273,9 +279,31 @@ pipeline {
}
}
}
}
stage
(
"DB Host"
){
agent
{
label
DataBaseHost
}
stages
{
stage
(
"SQL Collect "
)
{
steps
{
script
{
if
(
currentBuild
.
result
==
'FAILURE'
)
{
StatusForDb
=
'FAIL'
}
else
{
StatusForDb
=
'PASS'
}
echo
"${env.BUILD_URL}"
echo
"${env.BUILD_ID}"
echo
"${JOB_NAME}"
sh
"python3 /home/oaicicd/sql_connect.py ${params.eNB_MR} ${params.eNB_Branch} ${StatusForDb} ''"
}
}
}
}
}
}
post
{
always
{
node
(
pythonExecutor
){
script
{
if
(
params
.
pipelineZipsConsoleLog
!=
null
)
{
if
(
params
.
pipelineZipsConsoleLog
)
{
...
...
@@ -290,4 +318,5 @@ pipeline {
}
}
}
}
}
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