pub struct ZStep {
pub run: Option<ZCommand>,
pub copy: Option<ZCopySources>,
pub add: Option<ZCopySources>,
pub env: Option<HashMap<String, String>>,
pub workdir: Option<String>,
pub user: Option<String>,
pub to: Option<String>,
pub from: Option<String>,
pub owner: Option<String>,
pub chmod: Option<String>,
pub cache: Vec<ZCacheMount>,
}Expand description
A single build instruction within a stage.
Exactly one of the action fields (run, copy, add, env, workdir,
user) should be set. The remaining fields are modifiers that apply to
the chosen action.
Fields§
§run: Option<ZCommand>Shell command or exec-form command to run
copy: Option<ZCopySources>Source path(s) to copy into the image
add: Option<ZCopySources>Source path(s) to add (supports URLs and auto-extraction)
env: Option<HashMap<String, String>>Environment variables to set
workdir: Option<String>Change working directory
user: Option<String>Change user
to: Option<String>Destination path (for copy/add actions)
from: Option<String>Source stage name for cross-stage copy (replaces --from)
owner: Option<String>File ownership (replaces --chown)
chmod: Option<String>File permissions (replaces --chmod)
cache: Vec<ZCacheMount>Cache mounts for RUN steps
Trait Implementations§
Source§impl<'de> Deserialize<'de> for ZStep
impl<'de> Deserialize<'de> for ZStep
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for ZStep
impl RefUnwindSafe for ZStep
impl Send for ZStep
impl Sync for ZStep
impl Unpin for ZStep
impl UnsafeUnpin for ZStep
impl UnwindSafe for ZStep
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more