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
f078e6f9
Commit
f078e6f9
authored
Dec 04, 2024
by
Jaroslava Fiedlerova
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
CI: modify and rename CopyinContainerLog to use docker services
parent
a9ca4a54
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
ci-scripts/cls_containerize.py
ci-scripts/cls_containerize.py
+3
-3
No files found.
ci-scripts/cls_containerize.py
View file @
f078e6f9
...
...
@@ -219,9 +219,9 @@ def GetServices(ssh, requested, file):
else
:
return
requested
def
Copyin
ContainerLog
(
ssh
,
lSourcePath
,
yaml
,
containerName
,
filename
):
def
Copyin
ServiceLog
(
ssh
,
lSourcePath
,
yaml
,
svcName
,
wd_yaml
,
filename
):
remote_filename
=
f"
{
lSourcePath
}
/cmake_targets/log/
{
filename
}
"
ssh
.
run
(
f'docker
logs
{
containerName
}
&>
{
remote_filename
}
'
)
ssh
.
run
(
f'docker
compose -f
{
wd_yaml
}
logs
{
svcName
}
--no-log-prefix
&>
{
remote_filename
}
'
)
local_dir
=
f"
{
os
.
getcwd
()
}
/../cmake_targets/log/
{
yaml
}
"
local_filename
=
f"
{
local_dir
}
/
{
filename
}
"
return
ssh
.
copyin
(
remote_filename
,
local_filename
)
...
...
@@ -903,7 +903,7 @@ class Containerize():
if
services
is
not
None
:
all_serv
=
" "
.
join
([
s
for
s
,
_
in
services
])
ssh
.
run
(
f'docker compose -f
{
wd
}
/docker-compose.y*ml stop --
{
all_serv
}
'
)
copyin_res
=
all
(
Copyin
ContainerLog
(
ssh
,
lSourcePath
,
yaml_dir
,
c
,
f'
{
s
}
-
{
HTML
.
testCase_id
}
.log'
)
for
s
,
c
in
services
)
copyin_res
=
all
(
Copyin
ServiceLog
(
ssh
,
lSourcePath
,
yaml_dir
,
s
,
f"
{
wd
}
/docker-compose.y*ml"
,
f'
{
s
}
-
{
HTML
.
testCase_id
}
.log'
)
for
s
,
c
in
services
)
else
:
logging
.
warning
(
'could not identify services to stop => no log file'
)
ssh
.
run
(
f'docker compose -f
{
wd
}
/docker-compose.y*ml down -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