Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
B
bitia-cli
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
1
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
bitia
bitia-cli
Commits
6675447d
Commit
6675447d
authored
2 years ago
by
dilawar
Browse files
Options
Downloads
Patches
Plain Diff
chore: Fixes to the new API.
parent
3d0703e7
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!2
version 0.2.0
Pipeline
#3697
failed with stages
Stage:
Stage:
in 1 minute and 50 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
bitia/__main__.py
+7
-7
7 additions, 7 deletions
bitia/__main__.py
with
7 additions
and
7 deletions
bitia/__main__.py
+
7
−
7
View file @
6675447d
...
...
@@ -96,8 +96,8 @@ def submit_pipeline(user_input: str, server: str = DEFAULT_SERVER):
def
run_pipeline
(
user_input
:
str
,
server
:
str
=
DEFAULT_SERVER
):
"""
Run a pipeline
"""
pipeline_zip
=
user_input_to_pipeline
(
user_input
)
containe
rs
=
submit_job
(
pipeline_zip
,
server
=
server
)
return
_log_container
(
container
s
,
server
=
server
)
r
e
s
=
submit_job
(
pipeline_zip
,
server
=
server
)
return
_log_container
(
res
[
"
container
"
]
,
server
=
server
)
@app.command
()
...
...
@@ -106,10 +106,10 @@ def version():
print
(
bitia
.
version
())
def
_log_container
(
container
s
:
T
.
List
[
T
.
Any
]
,
server
:
str
):
for
container
in
container
s
:
for
line
in
_fetch_logs
(
container
[
"
Name
"
]
,
server
=
server
):
print
(
line
.
decode
().
rstrip
())
def
_log_container
(
container
:
str
,
server
:
str
):
logger
.
info
(
f
"
Fetching logs from
{
container
}
"
)
for
line
in
_fetch_logs
(
container
,
server
=
server
):
print
(
line
.
decode
().
rstrip
())
def
_check_server_status
(
server
:
str
)
->
int
:
...
...
@@ -240,7 +240,7 @@ def _fetch_logs(container: str, *, server):
logger
.
info
(
f
"
Fetching logs for container `
{
container
}
`
"
)
return
g_session
.
post
(
f
"
{
server
}
/logs
"
,
json
=
dict
(
container
=
container
,
follow
=
True
,
tail
=-
1
),
json
=
dict
(
container
=
container
,
follow
=
True
),
stream
=
True
,
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment