Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-SMF
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
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-SMF
Commits
e93f6934
Commit
e93f6934
authored
Feb 23, 2023
by
Raphael Defosseux
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
chore(ci): HTML report not correct anymore w/ docker buildx
parent
0b522bb2
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
8 deletions
+18
-8
ci-scripts/Jenkinsfile-GitLab-Docker
ci-scripts/Jenkinsfile-GitLab-Docker
+2
-0
ci-scripts/generateHtmlReport.py
ci-scripts/generateHtmlReport.py
+16
-8
No files found.
ci-scripts/Jenkinsfile-GitLab-Docker
View file @
e93f6934
...
...
@@ -156,6 +156,7 @@ pipeline {
// Putting a place holder to try out on the flattening of image.
// If not satisfactory, we can remove it.
sh
"python3 ./ci-scripts/flatten_image.py --tag oai-smf:${smf_tag}"
sh
"docker image prune --force"
sh
"docker image ls >> archives/smf_docker_image_build.log"
// Pushing to local private registry for testing purpose
sh
"docker login -u oaicicd -p oaicicd ${PrivateRegistryURL}"
...
...
@@ -194,6 +195,7 @@ pipeline {
sh
"sudo cp /etc/rhsm/ca/*pem ./rhsm-ca"
// Building
sh
"sudo podman build --no-cache --squash --target oai-smf --tag oai-smf:${smf_tag} --file docker/Dockerfile.smf.rhel8 --format docker . > archives/smf_podman_image_build.log 2>&1"
sh
"sudo podman image prune --force"
sh
"sudo podman image ls >> archives/smf_podman_image_build.log"
}
}
...
...
ci-scripts/generateHtmlReport.py
View file @
e93f6934
...
...
@@ -490,9 +490,18 @@ class HtmlReport():
nghttp2_build_start
=
False
nghttp2_build_status
=
False
base_image
=
False
build_stage_id
=
'NotAcorrectBuildStageId'
with
open
(
cwd
+
'/archives/'
+
logFileName
,
'r'
)
as
logfile
:
for
line
in
logfile
:
# old method
result
=
re
.
search
(
'FROM oai-smf-base:latest'
,
line
)
if
result
is
not
None
:
base_image
=
True
# new method --> buildx may cache this stage
result
=
re
.
search
(
'^#([0-9]+).* RUN ./build_smf --install-deps'
,
line
)
if
result
is
not
None
:
build_stage_id
=
result
.
group
(
1
)
result
=
re
.
search
(
f'^#
{
build_stage_id
}
CACHED'
,
line
)
if
result
is
not
None
:
base_image
=
True
result
=
re
.
search
(
section_start_pattern
,
line
)
...
...
@@ -719,7 +728,7 @@ class HtmlReport():
for
variant
in
variants
:
logFileName
=
'smf_'
+
variant
+
'_image_build.log'
if
os
.
path
.
isfile
(
cwd
+
'/archives/'
+
logFileName
):
section_start_pattern
=
'
FROM .* as oai-smf$
'
section_start_pattern
=
'
COPY --from=oai-smf-builder */openair-smf/build/smf/build/oai_smf
'
section_end_pattern
=
'WORKDIR /openair-smf/etc'
section_status
=
False
status
=
False
...
...
@@ -767,7 +776,7 @@ class HtmlReport():
if
os
.
path
.
isfile
(
cwd
+
'/archives/'
+
logFileName
):
section_start_pattern
=
'WORKDIR /openair-smf/etc'
if
variant
==
'docker'
:
section_end_pattern
=
'
Successfully tagged oai-smf
'
section_end_pattern
=
'
naming to docker.io/library/oai-smf:
'
else
:
section_end_pattern
=
'COMMIT oai-smf:'
section_status
=
False
...
...
@@ -818,27 +827,26 @@ class HtmlReport():
if
os
.
path
.
isfile
(
cwd
+
'/archives/'
+
logFileName
):
if
nfType
==
'SMF'
:
if
variant
==
'docker'
:
section_start_pattern
=
'
Successfully tagged oai-smf
'
section_start_pattern
=
'
naming to docker.io/library/oai-smf:
'
section_end_pattern
=
'OAI-SMF DOCKER IMAGE BUILD'
else
:
section_start_pattern
=
'COMMIT oai-smf:'
section_end_pattern
=
'OAI-SMF PODMAN RHEL8 IMAGE BUILD'
section_status
=
False
status
=
False
imageTag
=
'notAcorrectTagForTheMoment'
with
open
(
cwd
+
'/archives/'
+
logFileName
,
'r'
)
as
logfile
:
for
line
in
logfile
:
result
=
re
.
search
(
section_start_pattern
,
line
)
result
=
re
.
search
(
f'
{
section_start_pattern
}
([0-9a-zA-Z\-\_\.]+)'
,
line
)
if
result
is
not
None
:
section_status
=
True
imageTag
=
result
.
group
(
1
)
result
=
re
.
search
(
section_end_pattern
,
line
)
if
result
is
not
None
:
section_status
=
False
if
section_status
:
if
nfType
==
'SMF'
:
if
self
.
git_pull_request
:
result
=
re
.
search
(
'oai-smf *ci-tmp'
,
line
)
else
:
result
=
re
.
search
(
'oai-smf *develop'
,
line
)
result
=
re
.
search
(
f'oai-smf *
{
imageTag
}
'
,
line
)
if
result
is
not
None
and
not
status
:
result
=
re
.
search
(
'ago *([0-9A-Z ]+)'
,
line
)
if
result
is
not
None
:
...
...
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