Skip to content

Commit

Permalink
fix: update volume mounting from host to container
Browse files Browse the repository at this point in the history
  • Loading branch information
seppzer0 committed Feb 22, 2024
1 parent fb531b9 commit e5f1c25
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 15 deletions.
1 change: 1 addition & 0 deletions .github/workflows/github-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ jobs:
name: build-artifacts
path: "multi-build"
retention-days: 1
if-no-files-found: "error"
release:
runs-on: ubuntu-latest
needs: build
Expand Down
21 changes: 6 additions & 15 deletions wrapper/engines/container_engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,6 @@ class ContainerEngine(BaseModel, IContainerEngine):
:param name_image: Name of the Docker/Podman image.
:param name_container: Name of the Docker/Podman container.
:param dir_kernel: Directory (name) for the kernel artifacts.
:param dir_assets: Directory (name) for the assets artifacts.
:param dir_bundle: Directory (name) for the bundle artifacts.
:param wdir_container: Working directory in the container.
:param wdir_local: Working directory from the local environment (aka root of the repo).
:param benv: Build environment.
Expand All @@ -46,9 +43,6 @@ class ContainerEngine(BaseModel, IContainerEngine):

name_image: str = "zero-kernel-image"
name_container: str = "zero-kernel-container"
dir_kernel: Path = dcfg.kernel.name
dir_assets: Path = dcfg.assets.name
dir_bundle: Path = dcfg.bundle.name
wdir_container: Path = Path("/", "zero_build")
wdir_local: Path = dcfg.root

Expand Down Expand Up @@ -121,31 +115,28 @@ def container_options(self) -> list[str]:
match self.module:
case "kernel":
options.append(
'-v {}/{}:{}/{}'.format(
dcfg.root,
'-v {}:{}/{}'.format(
dcfg.kernel,
self.wdir_container,
dcfg.kernel
dcfg.kernel.name
)
)
case "assets":
options.append(
'-v {}/{}:{}/{}'.format(
dcfg.root,
'-v {}:{}/{}'.format(
dcfg.assets,
self.wdir_container,
dcfg.assets
dcfg.assets.name
)
)
case "bundle":
match self.package_type:
case "slim" | "full":
options.append(
'-v {}/{}:{}/{}'.format(
dcfg.root,
'-v {}:{}/{}'.format(
dcfg.bundle,
self.wdir_container,
dcfg.bundle
dcfg.bundle.name
)
)
case "conan":
Expand Down

0 comments on commit e5f1c25

Please sign in to comment.