pub struct PipelineJobCtx<'a> { /* private fields */ }
Implementations§
Source§impl PipelineJobCtx<'_>
impl PipelineJobCtx<'_>
Sourcepub fn new_done_handle(&mut self) -> WriteVar<SideEffect>
pub fn new_done_handle(&mut self) -> WriteVar<SideEffect>
Create a new WriteVar<SideEffect>
anchored to the pipeline job.
Sourcepub fn use_artifact(&mut self, artifact: &UseArtifact) -> ReadVar<PathBuf>
pub fn use_artifact(&mut self, artifact: &UseArtifact) -> ReadVar<PathBuf>
Claim that this job will use this artifact, obtaining a path to a folder with the artifact’s contents.
Sourcepub fn publish_artifact(
&mut self,
artifact: PublishArtifact,
) -> ReadVar<PathBuf>
pub fn publish_artifact( &mut self, artifact: PublishArtifact, ) -> ReadVar<PathBuf>
Claim that this job will publish this artifact, obtaining a path to a fresh, empty folder which will be published as the specific artifact at the end of the job.
Sourcepub fn use_parameter<T>(&mut self, param: UseParameter<T>) -> ReadVar<T>where
T: Serialize + DeserializeOwned,
pub fn use_parameter<T>(&mut self, param: UseParameter<T>) -> ReadVar<T>where
T: Serialize + DeserializeOwned,
Obtain a ReadVar<T>
corresponding to a pipeline parameter which is
specified at runtime.
Sourcepub fn new_parameter_bool(
&mut self,
name: impl AsRef<str>,
description: impl AsRef<str>,
kind: ParameterKind,
default: Option<bool>,
) -> ReadVar<bool>
pub fn new_parameter_bool( &mut self, name: impl AsRef<str>, description: impl AsRef<str>, kind: ParameterKind, default: Option<bool>, ) -> ReadVar<bool>
Shortcut which allows defining a bool pipeline parameter within a Job.
To share a single parameter between multiple jobs, don’t use this method
- use
Pipeline::new_parameter_bool
+Self::use_parameter
instead.
Sourcepub fn new_parameter_num(
&mut self,
name: impl AsRef<str>,
description: impl AsRef<str>,
kind: ParameterKind,
default: Option<i64>,
possible_values: Option<Vec<i64>>,
) -> ReadVar<i64>
pub fn new_parameter_num( &mut self, name: impl AsRef<str>, description: impl AsRef<str>, kind: ParameterKind, default: Option<i64>, possible_values: Option<Vec<i64>>, ) -> ReadVar<i64>
Shortcut which allows defining a number pipeline parameter within a Job.
To share a single parameter between multiple jobs, don’t use this method
- use
Pipeline::new_parameter_num
+Self::use_parameter
instead.
Sourcepub fn new_parameter_string(
&mut self,
name: impl AsRef<str>,
description: impl AsRef<str>,
kind: ParameterKind,
default: Option<String>,
possible_values: Option<Vec<String>>,
) -> ReadVar<String>
pub fn new_parameter_string( &mut self, name: impl AsRef<str>, description: impl AsRef<str>, kind: ParameterKind, default: Option<String>, possible_values: Option<Vec<String>>, ) -> ReadVar<String>
Shortcut which allows defining a string pipeline parameter within a Job.
To share a single parameter between multiple jobs, don’t use this method
- use
Pipeline::new_parameter_string
+Self::use_parameter
instead.