fix: Use different mount options based on build engine
This commit is contained in:
parent
a7d862abf0
commit
2a1cab3598
7 changed files with 43 additions and 6 deletions
|
|
@ -40,12 +40,14 @@ RUN --mount=type=bind,from={{ blue_build_utils::constants::NUSHELL_IMAGE }}:{{ g
|
|||
&& cp -r /tmp/nu/* /usr/libexec/bluebuild/nu/
|
||||
{%- endif %}
|
||||
|
||||
RUN --mount=type=bind,src={{ build_scripts_dir.display() }},dst=/scripts/ \
|
||||
RUN \
|
||||
{{ scripts_mount("/scripts/") }} \
|
||||
/scripts/pre_build.sh
|
||||
|
||||
{% call modules::main_modules_run(recipe.modules_ext, os_version) %}
|
||||
|
||||
RUN --mount=type=bind,src={{ build_scripts_dir.display() }},dst=/scripts/ \
|
||||
RUN \
|
||||
{{ scripts_mount("/scripts/") }} \
|
||||
/scripts/post_build.sh
|
||||
|
||||
# Labels are added last since they cause cache misses with buildah
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ RUN \
|
|||
{%- if module.module_type.typ() == "akmods" %}
|
||||
--mount=type=bind,from=stage-akmods-{{ module.generate_akmods_info(os_version).stage_name }},src=/rpms,dst=/tmp/rpms,rw \
|
||||
{%- endif %}
|
||||
--mount=type=bind,src={{ build_scripts_dir.display() }},dst=/tmp/scripts/ \
|
||||
{{ scripts_mount("/tmp/scripts/") }} \
|
||||
--mount=type=cache,dst=/var/cache/rpm-ostree,id=rpm-ostree-cache-{{ recipe.name }}-{{ recipe.image_version }},sharing=locked \
|
||||
--mount=type=cache,dst=/var/cache/libdnf5,id=dnf-cache-{{ recipe.name }}-{{ recipe.image_version }},sharing=locked \
|
||||
{%- for secret_var in module.secrets.envs() %}
|
||||
|
|
@ -78,7 +78,7 @@ RUN \
|
|||
{%- else %}
|
||||
--mount=type=bind,from={{ module.get_module_image() }},src=/modules,dst=/tmp/modules,rw \
|
||||
{%- endif %}
|
||||
--mount=type=bind,src={{ build_scripts_dir.display() }},dst=/tmp/scripts/ \
|
||||
{{ scripts_mount("/tmp/scripts/") }} \
|
||||
{%- for secret_var in module.secrets.envs() %}
|
||||
{{ secret_var }} \
|
||||
{%- endfor %}
|
||||
|
|
|
|||
|
|
@ -62,7 +62,7 @@ COPY --from={{ blue_build_utils::constants::NUSHELL_IMAGE }}:{{ get_nu_version()
|
|||
|
||||
# Add compatibility for modules
|
||||
RUN --mount=type=bind,from=stage-bins,src=/bins/,dst=/tmp/bins/ \
|
||||
--mount=type=bind,src={{ build_scripts_dir.display() }},dst=/tmp/scripts/ \
|
||||
{{ scripts_mount("/tmp/scripts/") }} \
|
||||
/tmp/scripts/setup.sh
|
||||
|
||||
{%- if self::config_dir_exists() %}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue