Skip to content
GitLab
Menu
Why GitLab
Pricing
Contact Sales
Explore
Why GitLab
Pricing
Contact Sales
Explore
Sign in
Get free trial
Primary navigation
Search or go to…
Project
buildstream
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
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
Privacy statement
Keyboard shortcuts
?
What's new
6
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
BuildStream
buildstream
Commits
3f15801c
Commit
3f15801c
authored
6 years ago
by
Gökçen Nurlu
Browse files
Options
Downloads
Patches
Plain Diff
Add explicit fetch flag for 'bst pull' command
parent
7f79b9ce
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
buildstream/_frontend/cli.py
+4
-2
4 additions, 2 deletions
buildstream/_frontend/cli.py
buildstream/_stream.py
+4
-2
4 additions, 2 deletions
buildstream/_stream.py
with
8 additions
and
4 deletions
buildstream/_frontend/cli.py
+
4
−
2
View file @
3f15801c
...
...
@@ -431,8 +431,10 @@ def track(app, elements, deps, except_, cross_junctions):
help
=
"
The URL of the remote cache (defaults to the first configured cache)
"
)
@click.argument
(
'
elements
'
,
nargs
=-
1
,
type
=
click
.
Path
(
readable
=
False
))
@click.option
(
'
--fetch
'
,
'
fetch_
'
,
default
=
False
,
is_flag
=
True
,
help
=
"
Enable auto-fetching of junction(s) automatically if element has dependencies
"
)
@click.pass_obj
def
pull
(
app
,
elements
,
deps
,
remote
):
def
pull
(
app
,
elements
,
deps
,
remote
,
fetch_
):
"""
Pull a built artifact from the configured remote artifact cache.
By default the artifact will be pulled one of the configured caches
...
...
@@ -446,7 +448,7 @@ def pull(app, elements, deps, remote):
all: All dependencies
"""
with
app
.
initialized
(
session_name
=
"
Pull
"
):
app
.
stream
.
pull
(
elements
,
selection
=
deps
,
remote
=
remote
)
app
.
stream
.
pull
(
elements
,
selection
=
deps
,
remote
=
remote
,
fetch_subprojects
=
fetch_
)
##################################################################
...
...
This diff is collapsed.
Click to expand it.
buildstream/_stream.py
+
4
−
2
View file @
3f15801c
...
...
@@ -289,13 +289,15 @@ class Stream():
# targets (list of str): Targets to pull
# selection (PipelineSelection): The selection mode for the specified targets
# remote (str): The URL of a specific remote server to pull from, or None
# fetch_subprojects (bool): Flag to enable auto-fetch of junctions if they are needed by `targets`
#
# If `remote` specified as None, then regular configuration will be used
# to determine where to pull artifacts from.
#
def
pull
(
self
,
targets
,
*
,
selection
=
PipelineSelection
.
NONE
,
remote
=
None
):
remote
=
None
,
fetch_subprojects
):
use_config
=
True
if
remote
:
...
...
@@ -305,7 +307,7 @@ class Stream():
selection
=
selection
,
use_artifact_config
=
use_config
,
artifact_remote_url
=
remote
,
fetch_subprojects
=
True
)
fetch_subprojects
=
fetch_subprojects
)
if
not
self
.
_artifacts
.
has_fetch_remotes
():
raise
StreamError
(
"
No artifact caches available for pulling artifacts
"
)
...
...
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