Environment Variables
Environment Variables
Section titled “Environment Variables”Configure builds with environment variables and secrets.
Adding Variables
Section titled “Adding Variables”- Go to Settings (org, repo, or pipeline level)
- Click Variables or Secrets
- Add key-value pairs
Variable Scopes
Section titled “Variable Scopes”| Scope | Visibility |
|---|---|
| Organization | All repos in org |
| Repository | All pipelines in repo |
| Pipeline | Single pipeline |
Using Variables
Section titled “Using Variables”In shell scripts:
echo $MY_VARIABLEflutter build --dart-define=API_URL=$API_URLIn configs:
{{MY_VARIABLE}}Best Practices
Section titled “Best Practices”- Use secrets for sensitive data (API keys, passwords)
- Use descriptive names
- Document what each variable is for