Writing a Pipeline
This section provides a detailed explanation of how to write the various components of an AtomGit Action pipeline, covering the basics of workflow files, triggers, task and step configurations, script commands, Action plugins, dependency orchestration, conditional execution, matrix builds, variables and secrets, output passing, artifact management, and cache usage.
📄️ Workflow File Location and Basic Structure
Applicable scenarios: When you need to create the first AtomGit Action pipeline in a repository, or when you need to understand where the workflow file should be placed, how to name it, and what the basic YAML structure looks like.
📄️ Configure Trigger Conditions
Applicable Scenarios: When you need to control when a workflow is triggered by specific events, branches, paths, or tags.
📄️ Configuring Jobs
Use Case: When you need to define one or more jobs in a workflow, specifying the runtime environment, timeout, environment variables, concurrency control, matrix strategy, etc.
📄️ Configuration Steps
Applicable Scenario: When you need to define specific execution steps within a job, including running scripts, calling Action plugins, setting environment variables, conditional execution, etc.
📄️ Using Script Commands
Applicable scenarios: When you need to execute shell commands, call scripts in the repository, set environment variables, or write output parameters in a step.
📄️ Using Action Plugins
Applicable Scenarios: When you need to call reusable Action plugins in a step to perform operations such as pulling code, setting up the language environment, caching dependencies, and uploading artifacts.
📄️ Configuring Task Dependencies and Execution Order
Applicable Scenarios: When you need to control the execution order of multiple jobs to implement a serial process such as build → test → deploy, or more complex DAG topologies.
📄️ Configure Conditional Execution
Applicable Scenarios: When you need to control whether a job or step is executed based on conditions such as branch, Tag, event type, and previous step status.
📄️ Configuration Matrix Construction
Applicable Scenario: When you need to run tests or builds in parallel across multiple operating systems, multiple language versions, and various architecture combinations.
📄️ Using Variables and Secrets
Applicable Scenarios: When you need to use environment variables, configuration variables, secrets, or input parameters in a workflow and understand their scope and priority rules.
📄️ Passing Output Parameters Between Tasks
Applicable Scenario: When you need to pass output parameters between steps, jobs, or even workflows, for example, passing the build version number from a build job to a deploy job.
📄️ Upload and Download Artifacts
Use Case: When you need to pass build artifacts (such as compilation results, test reports, packaged files, etc.) between jobs.
📄️ Using Dependency Caches
Use Case: When you need to cache dependency packages (npm, Maven, pip, Gradle, etc.) to speed up subsequent builds.