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
48980057
Commit
48980057
authored
2 years ago
by
dilawar
Browse files
Options
Downloads
Patches
Plain Diff
fix: the pipeline file can't have variant data
Such a tempdir.
parent
c4aa5d5a
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!2
version 0.2.0
Pipeline
#3759
failed with stages
in 1 minute and 52 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
bitia/__main__.py
+6
-0
6 additions, 0 deletions
bitia/__main__.py
bitia/pipeline.py
+2
-4
2 additions, 4 deletions
bitia/pipeline.py
tests/test_pipeline.py
+1
-0
1 addition, 0 deletions
tests/test_pipeline.py
with
9 additions
and
4 deletions
bitia/__main__.py
+
6
−
0
View file @
48980057
...
@@ -110,6 +110,12 @@ def submit_pipeline(user_input: str, rerun: bool = False):
...
@@ -110,6 +110,12 @@ def submit_pipeline(user_input: str, rerun: bool = False):
return
containers
return
containers
@app.command
(
"
checksum
"
)
def
checksum
(
user_input
):
pipeline
=
bpipeline
.
user_input_to_pipeline
(
user_input
)
print
(
pipeline
.
checksum
)
@app.command
(
"
run
"
)
@app.command
(
"
run
"
)
@session
@session
def
run_pipeline
(
user_input
:
str
,
*
,
rerun
:
bool
=
False
):
def
run_pipeline
(
user_input
:
str
,
*
,
rerun
:
bool
=
False
):
...
...
This diff is collapsed.
Click to expand it.
bitia/pipeline.py
+
2
−
4
View file @
48980057
...
@@ -42,7 +42,7 @@ class Pipeline:
...
@@ -42,7 +42,7 @@ class Pipeline:
return
self
.
hash
return
self
.
hash
@classmethod
@classmethod
def
from_command
(
cls
,
cmd
:
str
,
comment
:
str
=
""
)
->
"
Pipeline
"
:
def
from_command
(
cls
,
cmd
:
str
,
*
,
comment
:
str
=
""
)
->
"
Pipeline
"
:
"""
Create a pipeline from user command. The semantics is a bit different
"""
Create a pipeline from user command. The semantics is a bit different
for this.
for this.
"""
"""
...
@@ -79,9 +79,7 @@ class Pipeline:
...
@@ -79,9 +79,7 @@ class Pipeline:
"""
Create pipeline from a directory
"""
"""
Create pipeline from a directory
"""
dinfo
=
dir_info
(
user_dir
)
dinfo
=
dir_info
(
user_dir
)
content_hash
=
dirhash
(
user_dir
)
content_hash
=
dirhash
(
user_dir
)
outfile
=
(
outfile
=
bconfig
.
bitia_dir
()
/
"
pipelines
"
/
f
"
{
content_hash
}
.zip
"
bconfig
.
bitia_dir
()
/
"
pipelines
"
/
f
"
{
content_hash
}
-
{
user_dir
.
name
}
.zip
"
)
if
not
outfile
.
is_file
():
if
not
outfile
.
is_file
():
logger
.
info
(
f
"
Preparing the zipfile pipeline from
{
user_dir
}
"
)
logger
.
info
(
f
"
Preparing the zipfile pipeline from
{
user_dir
}
"
)
logger
.
info
(
logger
.
info
(
...
...
This diff is collapsed.
Click to expand it.
tests/test_pipeline.py
+
1
−
0
View file @
48980057
...
@@ -18,6 +18,7 @@ def test_pipeline_singleton():
...
@@ -18,6 +18,7 @@ def test_pipeline_singleton():
p1
=
Pipeline
.
from_command
(
u1
)
p1
=
Pipeline
.
from_command
(
u1
)
p2
=
Pipeline
.
from_command
(
u1
)
p2
=
Pipeline
.
from_command
(
u1
)
assert
p1
==
p2
assert
p1
==
p2
p3
=
Pipeline
.
from_command
(
u2
)
p3
=
Pipeline
.
from_command
(
u2
)
p4
=
Pipeline
.
from_command
(
u2
)
p4
=
Pipeline
.
from_command
(
u2
)
assert
p3
==
p4
assert
p3
==
p4
...
...
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