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
ZhouShuya
OpenXG-RAN
Commits
a2fc1a5d
Commit
a2fc1a5d
authored
Mar 19, 2021
by
Raphael Defosseux
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[CI][DOCKER] display intermediate logs for CI purpose
Signed-off-by:
Raphael Defosseux
<
raphael.defosseux@eurecom.fr
>
parent
4a68d007
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
42 additions
and
25 deletions
+42
-25
ci-scripts/cls_containerize.py
ci-scripts/cls_containerize.py
+24
-17
cmake_targets/build_oai
cmake_targets/build_oai
+5
-0
cmake_targets/tools/build_helper
cmake_targets/tools/build_helper
+5
-0
docker/Dockerfile.eNB.rhel8.2
docker/Dockerfile.eNB.rhel8.2
+1
-1
docker/Dockerfile.eNB.ubuntu18
docker/Dockerfile.eNB.ubuntu18
+1
-1
docker/Dockerfile.gNB.rhel8.2
docker/Dockerfile.gNB.rhel8.2
+1
-1
docker/Dockerfile.gNB.ubuntu18
docker/Dockerfile.gNB.ubuntu18
+1
-1
docker/Dockerfile.lteUE.rhel8.2
docker/Dockerfile.lteUE.rhel8.2
+1
-1
docker/Dockerfile.lteUE.ubuntu18
docker/Dockerfile.lteUE.ubuntu18
+1
-1
docker/Dockerfile.nrUE.rhel8.2
docker/Dockerfile.nrUE.rhel8.2
+1
-1
docker/Dockerfile.nrUE.ubuntu18
docker/Dockerfile.nrUE.ubuntu18
+1
-1
No files found.
ci-scripts/cls_containerize.py
View file @
a2fc1a5d
...
...
@@ -189,7 +189,7 @@ class Containerize():
mySSH
.
command
(
'mkdir -p tmp/entitlement/'
,
'\$'
,
5
)
mySSH
.
command
(
'sudo cp /etc/rhsm/ca/redhat-uep.pem tmp/ca/'
,
'\$'
,
5
)
mySSH
.
command
(
'sudo cp /etc/pki/entitlement/*.pem tmp/entitlement/'
,
'\$'
,
5
)
sharedimage
=
'ran-build'
# Let's remove any previous run artifacts if still there
mySSH
.
command
(
self
.
cli
+
' image prune --force'
,
'\$'
,
5
)
...
...
@@ -198,22 +198,7 @@ class Containerize():
mySSH
.
command
(
self
.
cli
+
' image rm '
+
image
+
':'
+
imageTag
,
'\$'
,
5
)
# Build the shared image
mySSH
.
command
(
self
.
cli
+
' build --target '
+
sharedimage
+
' --tag '
+
sharedimage
+
':'
+
imageTag
+
' --file docker/Dockerfile.ran'
+
self
.
dockerfileprefix
+
' --build-arg NEEDED_GIT_PROXY="http://proxy.eurecom.fr:8080" . > cmake_targets/log/ran-build.log 2>&1'
,
'\$'
,
1600
)
# Build the target image(s)
previousImage
=
sharedimage
+
':'
+
imageTag
danglingShaOnes
=
[]
for
image
,
pattern
in
imageNames
:
# the archived Dockerfiles have "ran-build:latest" as base image
# we need to update them with proper tag
mySSH
.
command
(
'sed -i -e "s#'
+
sharedimage
+
':latest#'
+
sharedimage
+
':'
+
imageTag
+
'#" docker/Dockerfile.'
+
pattern
+
self
.
dockerfileprefix
,
'\$'
,
5
)
mySSH
.
command
(
self
.
cli
+
' build --target '
+
image
+
' --tag '
+
image
+
':'
+
imageTag
+
' --file docker/Dockerfile.'
+
pattern
+
self
.
dockerfileprefix
+
' . > cmake_targets/log/'
+
image
+
'.log 2>&1'
,
'\$'
,
1200
)
# Retrieving the dangling image(s) for the log collection
mySSH
.
command
(
self
.
cli
+
' images --filter "dangling=true" --filter "since='
+
previousImage
+
'" -q | sed -e "s#^#sha=#"'
,
'\$'
,
5
)
result
=
re
.
search
(
'sha=(?P<imageShaOne>[a-zA-Z0-9\-\_]+)'
,
mySSH
.
getBefore
())
if
result
is
not
None
:
danglingShaOnes
.
append
((
image
,
result
.
group
(
'imageShaOne'
)))
previousImage
=
image
+
':'
+
imageTag
# First verify if images were properly created.
# First verify if the shared image was properly created.
status
=
True
mySSH
.
command
(
self
.
cli
+
' image inspect --format=
\'
Size = {{.Size}} bytes
\'
'
+
sharedimage
+
':'
+
imageTag
,
'\$'
,
5
)
if
(
mySSH
.
getBefore
().
count
(
'No such object'
)
!=
0
)
or
(
mySSH
.
getBefore
().
count
(
'no such image'
)
!=
0
):
...
...
@@ -238,7 +223,29 @@ class Containerize():
self
.
allImagesSize
[
'ran-build'
]
=
str
(
round
(
imageSize
,
1
))
+
' Gbytes'
else
:
logging
.
debug
(
'ran-build size is unknown'
)
# If the shared image failed, no need to continue
if
not
status
:
mySSH
.
close
()
logging
.
error
(
'
\u001B
[1m Building OAI Images Failed
\u001B
[0m'
)
HTML
.
CreateHtmlTestRow
(
self
.
imageKind
,
'KO'
,
CONST
.
ALL_PROCESSES_OK
)
HTML
.
CreateHtmlTabFooter
(
False
)
sys
.
exit
(
1
)
# Build the target image(s)
previousImage
=
sharedimage
+
':'
+
imageTag
danglingShaOnes
=
[]
for
image
,
pattern
in
imageNames
:
# the archived Dockerfiles have "ran-build:latest" as base image
# we need to update them with proper tag
mySSH
.
command
(
'sed -i -e "s#'
+
sharedimage
+
':latest#'
+
sharedimage
+
':'
+
imageTag
+
'#" docker/Dockerfile.'
+
pattern
+
self
.
dockerfileprefix
,
'\$'
,
5
)
mySSH
.
command
(
self
.
cli
+
' build --target '
+
image
+
' --tag '
+
image
+
':'
+
imageTag
+
' --file docker/Dockerfile.'
+
pattern
+
self
.
dockerfileprefix
+
' . > cmake_targets/log/'
+
image
+
'.log 2>&1'
,
'\$'
,
1200
)
# Retrieving the dangling image(s) for the log collection
mySSH
.
command
(
self
.
cli
+
' images --filter "dangling=true" --filter "since='
+
previousImage
+
'" -q | sed -e "s#^#sha=#"'
,
'\$'
,
5
)
result
=
re
.
search
(
'sha=(?P<imageShaOne>[a-zA-Z0-9\-\_]+)'
,
mySSH
.
getBefore
())
if
result
is
not
None
:
danglingShaOnes
.
append
((
image
,
result
.
group
(
'imageShaOne'
)))
previousImage
=
image
+
':'
+
imageTag
# checking the status of the build
mySSH
.
command
(
self
.
cli
+
' image inspect --format=
\'
Size = {{.Size}} bytes
\'
'
+
image
+
':'
+
imageTag
,
'\$'
,
5
)
if
(
mySSH
.
getBefore
().
count
(
'No such object'
)
!=
0
)
or
(
mySSH
.
getBefore
().
count
(
'no such image'
)
!=
0
):
logging
.
error
(
'Could not build properly '
+
image
)
...
...
cmake_targets/build_oai
View file @
a2fc1a5d
...
...
@@ -50,6 +50,7 @@ REL="Rel15"
HW
=
"None"
TP
=
"None"
EPC
=
0
VERBOSE_CI
=
0
VERBOSE_COMPILE
=
0
CFLAGS_PROCESSOR_USER
=
""
RUN_GROUP
=
0
...
...
@@ -324,6 +325,10 @@ function main() {
HWLAT_TEST
=
1
echo_info
"Will compile hw latency test program"
shift
;;
--verbose-ci
)
VERBOSE_CI
=
1
echo_info
"Will compile with verbose instructions in CI Docker env"
shift
;;
--verbose-compile
)
VERBOSE_COMPILE
=
1
echo_info
"Will compile with verbose instructions"
...
...
cmake_targets/tools/build_helper
View file @
a2fc1a5d
...
...
@@ -221,6 +221,11 @@ compilations() {
ret=$?
} > $dlog/$2.$REL.txt 2>&1
set -e
if [ "$VERBOSE_CI" == "1" ]; then
echo_info "====== Start of log for $2.$REL.txt ======"
cat $dlog/$2.$REL.txt
echo_info "====== End of log for $2.$REL.txt ======"
fi
if [[ $ret -ne 0 ]]; then
check_warnings "$dlog/$2.$REL.txt"
check_errors "$dlog/$2.$REL.txt"
...
...
docker/Dockerfile.eNB.rhel8.2
View file @
a2fc1a5d
...
...
@@ -35,7 +35,7 @@ COPY . .
RUN /bin/sh oaienv && \
cd cmake_targets && \
mkdir -p log && \
./build_oai --eNB --ninja -w USRP
./build_oai --eNB --ninja -w USRP
--verbose-ci
# debug
#RUN ldconfig -v && ldd /oai-ran/targets/bin/lte-softmodem.Rel15
...
...
docker/Dockerfile.eNB.ubuntu18
View file @
a2fc1a5d
...
...
@@ -35,7 +35,7 @@ COPY . .
RUN /bin/sh oaienv && \
cd cmake_targets && \
mkdir -p log && \
./build_oai --eNB --ninja -w USRP
./build_oai --eNB --ninja -w USRP
--verbose-ci
RUN apt-get install -y python3-pip && \
pip3 install --ignore-installed pyyaml && \
...
...
docker/Dockerfile.gNB.rhel8.2
View file @
a2fc1a5d
...
...
@@ -35,7 +35,7 @@ COPY . .
RUN /bin/sh oaienv && \
cd cmake_targets && \
mkdir -p log && \
./build_oai --gNB --ninja -w USRP
./build_oai --gNB --ninja -w USRP
--verbose-ci
#debug
#RUN ldconfig -v
...
...
docker/Dockerfile.gNB.ubuntu18
View file @
a2fc1a5d
...
...
@@ -35,7 +35,7 @@ COPY . .
RUN /bin/sh oaienv && \
cd cmake_targets && \
mkdir -p log && \
./build_oai --gNB --ninja -w USRP
./build_oai --gNB --ninja -w USRP
--verbose-ci
#debug
RUN ldconfig -v
...
...
docker/Dockerfile.lteUE.rhel8.2
View file @
a2fc1a5d
...
...
@@ -35,7 +35,7 @@ COPY . .
RUN /bin/sh oaienv && \
cd cmake_targets && \
mkdir -p log && \
./build_oai --UE --ninja -w USRP
./build_oai --UE --ninja -w USRP
--verbose-ci
# debug
#RUN ldconfig -v && ldd /oai-ran/targets/bin/lte-uesoftmodem.Rel15
...
...
docker/Dockerfile.lteUE.ubuntu18
View file @
a2fc1a5d
...
...
@@ -35,7 +35,7 @@ COPY . .
RUN /bin/sh oaienv && \
cd cmake_targets && \
mkdir -p log && \
./build_oai --UE --ninja -w USRP
./build_oai --UE --ninja -w USRP
--verbose-ci
# debug
#RUN ldconfig -v
...
...
docker/Dockerfile.nrUE.rhel8.2
View file @
a2fc1a5d
...
...
@@ -35,7 +35,7 @@ COPY . .
RUN /bin/sh oaienv && \
cd cmake_targets && \
mkdir -p log && \
./build_oai --nrUE --ninja -w USRP
./build_oai --nrUE --ninja -w USRP
--verbose-ci
# debug
#RUN ldconfig -v
...
...
docker/Dockerfile.nrUE.ubuntu18
View file @
a2fc1a5d
...
...
@@ -35,7 +35,7 @@ COPY . .
RUN /bin/sh oaienv && \
cd cmake_targets && \
mkdir -p log && \
./build_oai --nrUE --ninja -w USRP
./build_oai --nrUE --ninja -w USRP
--verbose-ci
# debug
#RUN ldconfig -v
...
...
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