pub struct StageContext {Show 13 fields
pub all: HashMap<String, String>,
pub env: HashMap<String, String>,
pub github: Option<Value>,
pub inputs: HashMap<String, Value>,
pub job: Option<Value>,
pub jobs: HashMap<String, Value>,
pub matrix: HashMap<String, String>,
pub needs: HashMap<String, Value>,
pub runner: Option<Value>,
pub secrets: HashMap<String, String>,
pub steps: HashMap<String, Value>,
pub strategy: Option<Value>,
pub vars: HashMap<String, String>,
}Fields§
§all: HashMap<String, String>Including all vars, priority from low to high, higher priority key could override lower priority key 1. The predefined variables for github/gitlab. 2. The web ui configured vars or envs, exclude secrets.
env: HashMap<String, String>Contains variables set in a workflow, job, or step. Static data eg: env.ENV_NAME Value is encoded with base64 standard
github: Option<Value>§inputs: HashMap<String, Value>Contains the inputs of a reusable or manually triggered workflow. Runtime data eg: ${{inputs.INPUT_NAME}} value is jobs.<job_id>.with
job: Option<Value>§jobs: HashMap<String, Value>For reusable workflows only, contains outputs of jobs from the reusable workflow. Runtime data Initialized when stage is pushed into queue. Updated when stage is updated by api or else. key: job name or stage name value: JobsContext, refer to Github docs. Converted to serde_json::Value for recursively inject variables
matrix: HashMap<String, String>§needs: HashMap<String, Value>Contains the outputs of all jobs that are defined as a dependency of the current job. Runtime data key: job name value: JobsContext. Converted to serde_json::Value for recursively inject variables.
runner: Option<Value>§secrets: HashMap<String, String>Contains the names and values of secrets that are available to a workflow run. Sensitive data, only available to the job that will be running. eg: github: secrets.SECRET_NAME gitlab: $SECRET_NAME, secret.SECRET_NAME Value is encoded with base64 standard
steps: HashMap<String, Value>Information about the steps that have been run in the current job. Runtime data key: step id (set in step yaml) value: refer to StepsContext. Converted to serde_json::Value for recursively inject variables.
strategy: Option<Value>§vars: HashMap<String, String>Contains variables set at the repository, organization, or environment levels. Static data eg: gitlab: variables.VAR_NAME github: vars.VAR_NAME Value is encoded with base64 standard
Implementations§
Source§impl StageContext
impl StageContext
pub fn new( all: HashMap<String, String>, env: HashMap<String, String>, github: Option<Value>, inputs: HashMap<String, Value>, job: Option<Value>, jobs: HashMap<String, Value>, matrix: HashMap<String, String>, needs: HashMap<String, Value>, runner: Option<Value>, secrets: HashMap<String, String>, steps: HashMap<String, Value>, strategy: Option<Value>, vars: HashMap<String, String>, ) -> StageContext
Trait Implementations§
Source§impl Clone for StageContext
impl Clone for StageContext
Source§fn clone(&self) -> StageContext
fn clone(&self) -> StageContext
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for StageContext
impl Debug for StageContext
Source§impl Default for StageContext
impl Default for StageContext
Source§fn default() -> StageContext
fn default() -> StageContext
Source§impl<'de> Deserialize<'de> for StageContext
impl<'de> Deserialize<'de> for StageContext
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>,
Source§impl PartialEq for StageContext
impl PartialEq for StageContext
Source§impl Serialize for StageContext
impl Serialize for StageContext
impl StructuralPartialEq for StageContext
Auto Trait Implementations§
impl Freeze for StageContext
impl RefUnwindSafe for StageContext
impl Send for StageContext
impl Sync for StageContext
impl Unpin for StageContext
impl UnwindSafe for StageContext
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
clone_to_uninit)