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
8de8ef1f
Commit
8de8ef1f
authored
7 years ago
by
Jürg Billeter
Browse files
Options
Downloads
Patches
Plain Diff
_platform: Use CAS artifact cache
parent
9b879015
No related branches found
No related tags found
Loading
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
buildstream/_platform/linux.py
+2
-2
2 additions, 2 deletions
buildstream/_platform/linux.py
buildstream/_platform/unix.py
+2
-2
2 additions, 2 deletions
buildstream/_platform/unix.py
tests/testutils/runcli.py
+1
-6
1 addition, 6 deletions
tests/testutils/runcli.py
with
5 additions
and
10 deletions
buildstream/_platform/linux.py
+
2
−
2
View file @
8de8ef1f
...
...
@@ -21,7 +21,7 @@ import subprocess
from
..
import
_site
from
..
import
utils
from
.._artifactcache.
ostree
cache
import
OSTree
Cache
from
.._artifactcache.
cas
cache
import
CAS
Cache
from
.._message
import
Message
,
MessageType
from
..sandbox
import
SandboxBwrap
...
...
@@ -36,7 +36,7 @@ class Linux(Platform):
self
.
_die_with_parent_available
=
_site
.
check_bwrap_version
(
0
,
1
,
8
)
self
.
_user_ns_available
=
self
.
_check_user_ns_available
(
context
)
self
.
_artifact_cache
=
OSTree
Cache
(
context
,
enable_push
=
self
.
_user_ns_available
)
self
.
_artifact_cache
=
CAS
Cache
(
context
,
enable_push
=
self
.
_user_ns_available
)
@property
def
artifactcache
(
self
):
...
...
This diff is collapsed.
Click to expand it.
buildstream/_platform/unix.py
+
2
−
2
View file @
8de8ef1f
...
...
@@ -19,7 +19,7 @@
import
os
from
.._artifactcache.
tar
cache
import
Tar
Cache
from
.._artifactcache.
cas
cache
import
CAS
Cache
from
.._exceptions
import
PlatformError
from
..sandbox
import
SandboxChroot
...
...
@@ -31,7 +31,7 @@ class Unix(Platform):
def
__init__
(
self
,
context
,
project
):
super
().
__init__
(
context
,
project
)
self
.
_artifact_cache
=
Tar
Cache
(
context
)
self
.
_artifact_cache
=
CAS
Cache
(
context
)
# Not necessarily 100% reliable, but we want to fail early.
if
os
.
geteuid
()
!=
0
:
...
...
This diff is collapsed.
Click to expand it.
tests/testutils/runcli.py
+
1
−
6
View file @
8de8ef1f
...
...
@@ -19,8 +19,6 @@ import pytest
#
from
_pytest.capture
import
MultiCapture
,
FDCapture
from
tests.testutils.site
import
IS_LINUX
# Import the main cli entrypoint
from
buildstream._frontend
import
cli
as
bst_cli
from
buildstream
import
_yaml
...
...
@@ -203,10 +201,7 @@ class Cli():
def
remove_artifact_from_cache
(
self
,
project
,
element_name
):
cache_dir
=
os
.
path
.
join
(
project
,
'
cache
'
,
'
artifacts
'
)
if
IS_LINUX
:
cache_dir
=
os
.
path
.
join
(
cache_dir
,
'
ostree
'
,
'
refs
'
,
'
heads
'
)
else
:
cache_dir
=
os
.
path
.
join
(
cache_dir
,
'
tar
'
)
cache_dir
=
os
.
path
.
join
(
cache_dir
,
'
cas
'
,
'
refs
'
,
'
heads
'
)
cache_dir
=
os
.
path
.
splitext
(
os
.
path
.
join
(
cache_dir
,
'
test
'
,
element_name
))[
0
]
shutil
.
rmtree
(
cache_dir
)
...
...
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