-
Notifications
You must be signed in to change notification settings - Fork 39
Open
Description
Chainloop provides automatic detection of CI/CD environments to ensure attestations are created in the correct context and to capture relevant execution metadata. This capability, known as runner context, is essential for enforcing where attestations can be executed and for maintaining comprehensive audit trails.
The autodetection process is implemented through the DiscoverRunner function. The logic is straightforward but robust:
- Environment Probing: The system iterates through all registered runner factories, instantiating each one and calling its CheckEnv() method. This method performs "duck-typing" checks by looking for specific environment variables that uniquely identify each CI/CD platform.
- Conflict Resolution: If multiple runners are detected simultaneously (an incongruent state), or if no runner is detected, the system defaults to a generic runner type. This ensures the attestation process can always proceed, even in unusual or local development environments.
- Single Detection: When exactly one runner is detected, that runner instance is returned and used for the attestation process.
Supported Platforms
Chainloop currently supports autodetection for seven CI/CD platforms:
- GitHub Actions - Detects GitHub-specific environment variables and can optionally authenticate via OIDC
- GitLab CI - Identifies GitLab pipelines and supports authentication tokens
- Azure Pipelines - Recognizes Azure DevOps build environments
- Jenkins - Detects Jenkins job executions
- CircleCI - Identifies CircleCI build contexts
- Dagger - Detects Dagger pipeline environments
- TeamCity - Recognizes TeamCity build configurations
The goal of this task is to explore how we can achieve a similar functionality for Tekton.
Metadata
Metadata
Assignees
Labels
No labels