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
27e37a41
Commit
27e37a41
authored
Aug 05, 2025
by
Robert Schmidt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use archiveArtifact() for LicenceAndFormattingCheck()
parent
025a6dbd
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
7 deletions
+7
-7
ci-scripts/cls_static_code_analysis.py
ci-scripts/cls_static_code_analysis.py
+6
-6
ci-scripts/main.py
ci-scripts/main.py
+1
-1
No files found.
ci-scripts/cls_static_code_analysis.py
View file @
27e37a41
...
@@ -43,6 +43,7 @@ from pathlib import Path
...
@@ -43,6 +43,7 @@ from pathlib import Path
import
helpreadme
as
HELP
import
helpreadme
as
HELP
import
constants
as
CONST
import
constants
as
CONST
import
cls_cmd
import
cls_cmd
from
cls_ci_helper
import
archiveArtifact
#-----------------------------------------------------------
#-----------------------------------------------------------
# Class Declaration
# Class Declaration
...
@@ -213,7 +214,7 @@ class StaticCodeAnalysis():
...
@@ -213,7 +214,7 @@ class StaticCodeAnalysis():
return
True
return
True
def
LicenceAndFormattingCheck
(
self
,
HTML
):
def
LicenceAndFormattingCheck
(
self
,
ctx
,
HTML
):
# Workspace is no longer recreated from scratch.
# Workspace is no longer recreated from scratch.
# It implies that this method shall be called last within a build pipeline
# It implies that this method shall be called last within a build pipeline
# where workspace is already created
# where workspace is already created
...
@@ -238,7 +239,7 @@ class StaticCodeAnalysis():
...
@@ -238,7 +239,7 @@ class StaticCodeAnalysis():
else
:
else
:
check_options
+=
f' --build-arg TARGET_BRANCH=
{
self
.
ranTargetBranch
}
'
check_options
+=
f' --build-arg TARGET_BRANCH=
{
self
.
ranTargetBranch
}
'
logDir
=
f'
{
lSourcePath
}
/cmake_targets/
build_log_
{
self
.
testCase_id
}
'
logDir
=
f'
{
lSourcePath
}
/cmake_targets/
log/
'
cmd
.
run
(
f'mkdir -p
{
logDir
}
'
)
cmd
.
run
(
f'mkdir -p
{
logDir
}
'
)
cmd
.
run
(
'docker image rm oai-formatting-check:latest'
)
cmd
.
run
(
'docker image rm oai-formatting-check:latest'
)
cmd
.
run
(
f'docker build --target oai-formatting-check --tag oai-formatting-check:latest
{
check_options
}
--file
{
lSourcePath
}
/ci-scripts/docker/Dockerfile.formatting.bionic
{
lSourcePath
}
>
{
logDir
}
/oai-formatting-check.txt 2>&1'
)
cmd
.
run
(
f'docker build --target oai-formatting-check --tag oai-formatting-check:latest
{
check_options
}
--file
{
lSourcePath
}
/ci-scripts/docker/Dockerfile.formatting.bionic
{
lSourcePath
}
>
{
logDir
}
/oai-formatting-check.txt 2>&1'
)
...
@@ -247,12 +248,11 @@ class StaticCodeAnalysis():
...
@@ -247,12 +248,11 @@ class StaticCodeAnalysis():
cmd
.
run
(
'docker image prune --force'
)
cmd
.
run
(
'docker image prune --force'
)
cmd
.
run
(
'docker volume prune --force'
)
cmd
.
run
(
'docker volume prune --force'
)
# Analyzing the logs
file
=
archiveArtifact
(
cmd
,
ctx
,
f'
{
logDir
}
/oai-formatting-check.txt'
)
cmd
.
copyin
(
f'
{
logDir
}
/oai-formatting-check.txt'
,
'oai-formatting-check.txt'
)
cmd
.
close
()
cmd
.
close
()
finalStatus
=
0
finalStatus
=
0
if
(
os
.
path
.
isfile
(
'./oai-formatting-check.txt'
)):
if
(
os
.
path
.
isfile
(
file
)):
analyzed
=
False
analyzed
=
False
nbFilesNotFormatted
=
0
nbFilesNotFormatted
=
0
listFiles
=
False
listFiles
=
False
...
@@ -263,7 +263,7 @@ class StaticCodeAnalysis():
...
@@ -263,7 +263,7 @@ class StaticCodeAnalysis():
gnuGplLicenceFiles
=
[]
gnuGplLicenceFiles
=
[]
suspectLicence
=
False
suspectLicence
=
False
suspectLicenceFiles
=
[]
suspectLicenceFiles
=
[]
with
open
(
'./oai-formatting-check.txt'
,
'r'
)
as
logfile
:
with
open
(
file
,
'r'
)
as
logfile
:
for
line
in
logfile
:
for
line
in
logfile
:
ret
=
re
.
search
(
'./ci-scripts/checkCodingFormattingRules.sh'
,
str
(
line
))
ret
=
re
.
search
(
'./ci-scripts/checkCodingFormattingRules.sh'
,
str
(
line
))
if
ret
is
not
None
:
if
ret
is
not
None
:
...
...
ci-scripts/main.py
View file @
27e37a41
...
@@ -346,7 +346,7 @@ def ExecuteActionWithParam(action, ctx):
...
@@ -346,7 +346,7 @@ def ExecuteActionWithParam(action, ctx):
success
=
cls_native
.
Native
.
Run_Physim
(
ctx
,
HTML
,
RAN
.
eNBIPAddress
,
RAN
.
eNBSourceCodePath
,
physim_options
,
physim_test
,
physim_threshold
)
success
=
cls_native
.
Native
.
Run_Physim
(
ctx
,
HTML
,
RAN
.
eNBIPAddress
,
RAN
.
eNBSourceCodePath
,
physim_options
,
physim_test
,
physim_threshold
)
elif
action
==
'LicenceAndFormattingCheck'
:
elif
action
==
'LicenceAndFormattingCheck'
:
success
=
SCA
.
LicenceAndFormattingCheck
(
HTML
)
success
=
SCA
.
LicenceAndFormattingCheck
(
ctx
,
HTML
)
elif
action
==
'Cppcheck_Analysis'
:
elif
action
==
'Cppcheck_Analysis'
:
success
=
SCA
.
CppCheckAnalysis
(
HTML
)
success
=
SCA
.
CppCheckAnalysis
(
HTML
)
...
...
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