1.2Shared Concepts Across All Platforms
Regardless of which platform you use, the following concepts work the same way. Understanding these makes switching platforms straightforward.
Triggers
Triggers define when a pipeline runs. Common triggers include:
- Push to branch: Run on every code push (most common for CI)
- Pull request / merge request: Run when a PR is opened or updated
- Schedule (cron): Run on a timer for nightly regressions or data freshness checks
- Manual dispatch: Allow humans to trigger pipelines with parameters (useful for deploying to specific environments)
- Tag creation: Run when a new release tag is pushed
Jobs and Steps
A job is a unit of work that runs on a single machine (runner). Jobs can run in parallel or sequentially depending on dependencies. A step is a single command or action within a job.
Pipeline
└── Job A (runs first)
├── Step 1: Checkout code
├── Step 2: Install dependencies
└── Step 3: Run unit tests
└── Job B (depends on Job A)
├── Step 1: Checkout code
├── Step 2: Run integration tests
└── Step 3: Upload test reports
Environment Variables and Secrets
Environment variables configure behavior without hardcoding values. Secrets are encrypted environment variables for sensitive data like API keys, passwords, and tokens.
Rules for secrets:
- Never commit secrets to version control
- Use the platform's secret store (GitHub Secrets, GitLab CI Variables, Jenkins Credentials)
- Rotate secrets regularly
- Scope secrets to the minimum required access (repository-level, not organization-level, when possible)
Runners
A runner is the machine where your pipeline executes. Hosted runners are provided by the platform (convenient but with limited customization). Self-hosted runners are machines you manage (more control, better for specialized hardware or internal network access).
When to use self-hosted runners:
- Tests need access to internal services behind a firewall
- You need specialized hardware (GPU, mobile devices)
- Pipeline volume makes hosted runners expensive
- Compliance requirements mandate that code never leaves your network