pub struct Job {Show 23 fields
pub stage: Option<String>,
pub image: Option<Image>,
pub script: Option<Vec<String>>,
pub before_script: Option<Vec<String>>,
pub after_script: Option<Vec<String>>,
pub when: Option<String>,
pub allow_failure: Option<bool>,
pub services: Option<Vec<Service>>,
pub tags: Option<Vec<String>>,
pub variables: Option<HashMap<String, String>>,
pub dependencies: Option<Vec<String>>,
pub artifacts: Option<Artifacts>,
pub cache: Option<Cache>,
pub rules: Option<Vec<Rule>>,
pub only: Option<Only>,
pub except: Option<Except>,
pub retry: Option<Retry>,
pub timeout: Option<String>,
pub parallel: Option<usize>,
pub template: Option<bool>,
pub extends: Option<Vec<String>>,
pub needs: Option<Value>,
pub interruptible: Option<bool>,
}Expand description
A job in a GitLab CI/CD pipeline
Fields§
§stage: Option<String>The stage this job belongs to
image: Option<Image>Docker image to use for this job
script: Option<Vec<String>>Script commands to run
before_script: Option<Vec<String>>Commands to run before the main script
after_script: Option<Vec<String>>Commands to run after the main script
when: Option<String>When to run the job (on_success, on_failure, always, manual)
allow_failure: Option<bool>Allow job failure
services: Option<Vec<Service>>Services to run alongside the job
Tags to define which runners can execute this job
variables: Option<HashMap<String, String>>Job-specific variables
dependencies: Option<Vec<String>>Job dependencies
artifacts: Option<Artifacts>Artifacts to store after job execution
cache: Option<Cache>Cache configuration
rules: Option<Vec<Rule>>Rules for when this job should run
only: Option<Only>Only run on specified refs
except: Option<Except>Exclude specified refs
retry: Option<Retry>Retry configuration
timeout: Option<String>Timeout for the job in seconds
parallel: Option<usize>Mark job as parallel and specify instance count
template: Option<bool>Flag to indicate this is a template job
extends: Option<Vec<String>>List of jobs this job extends from
needs: Option<Value>Job needs (dependencies with more granular control)
interruptible: Option<bool>Whether the job can be interrupted by a newer pipeline