pub struct StageContext {Show 13 fields
pub all: Option<HashMap<String, String>>,
pub env: Option<HashMap<String, String>>,
pub github: Option<Option<Box<GithubContext>>>,
pub inputs: Option<HashMap<String, Value>>,
pub job: Option<Option<Box<JobContext>>>,
pub jobs: Option<HashMap<String, JobsContext>>,
pub matrix: Option<HashMap<String, String>>,
pub needs: Option<HashMap<String, JobsContext>>,
pub runner: Option<Box<RunnerContext>>,
pub secrets: Option<HashMap<String, String>>,
pub steps: Option<HashMap<String, StepsContext>>,
pub strategy: Option<Box<StrategyContext>>,
pub vars: Option<HashMap<String, String>>,
}Fields§
§all: Option<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: Option<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<Option<Box<GithubContext>>>§inputs: Option<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 TODO: the value need specific type?
job: Option<Option<Box<JobContext>>>Information about the currently running job. Runtime data refer to JobContext. Converted to serde_json::Value for recursively inject variables
jobs: Option<HashMap<String, JobsContext>>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: Option<HashMap<String, String>>§needs: Option<HashMap<String, JobsContext>>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<Box<RunnerContext>>Information about the runner that is running the current job. Runtime data Refer to RunnerContext. Converted to serde_json::Value for recursively inject variables.
secrets: Option<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 scheduling. eg: github: secrets.SECRET_NAME gitlab: $SECRET_NAME, secret.SECRET_NAME Value is encoded with base64 standard
steps: Option<HashMap<String, StepsContext>>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<Box<StrategyContext>>§vars: Option<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() -> StageContext
Trait Implementations§
Source§impl Clone for StageContext
impl Clone for StageContext
Source§fn clone(&self) -> StageContext
fn clone(&self) -> StageContext
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more