aspect build and aspect test run Bazel builds and tests from your CI pipeline. On an Aspect Workflows runner, the runner’s cache, BES endpoint and output paths are injected by the Workflows feature. GitHub status checks are posted by the GithubStatusChecks feature. Artifact uploads are handled by the ArtifactUpload feature.
Task-level retry, timeout, and conditional execution are now handled by your CI platform rather than the task runner. Bazel’s internal retry for transient errors (e.g.
BLAZE_INTERNAL_ERROR, LOCAL_ENVIRONMENTAL_ERROR) is still built into the CLI.What changed
Configuration
Most settings below can be applied either way:- CLI flag: pass the flag at invocation time (e.g.
aspect build --bazel-flag=--config=remote //...). Good for overrides on individual task invocations, or experimenting with a setting before committing it. .aspect/config.axl: declare it once in your repo’s AXL config so everyaspect build/aspect testinvocation picks it up. Good for settings that should apply to all invocations of a task type. AXL can also compute values (e.g. branching on CI host or environment).
Targets
Before:.aspect/workflows/config.yaml:
config.axl:
..., which expands to all rule targets in the package at and beneath your current directory.
Bazel flags
Before:.aspect/workflows/config.yaml:
config.axl:
Test tag filters
Before:.aspect/workflows/config.yaml:
config.axl:
Code coverage
Before:.aspect/workflows/config.yaml:
config.axl:
--coverage adds --collect_code_coverage and --combined_report=lcov. --coverage-report copies the merged LCOV report to a path, and --coverage-tool runs an uploader against it. See Code coverage.
Test log upload
Before:.aspect/workflows/config.yaml:
config.axl:
none (default), failed, executed, all. Test log upload is one knob of the broader Artifact upload feature; see that section for the full list of artifact kinds and authentication requirements.
GitHub status checks
The legacy YAML-configured tasks posted build and test results to a PR comment via the Aspect Workflows GitHub App. There was no per-task GitHub status check. The new Aspect CLI posts a GitHub status check for eachaspect build / aspect test invocation via the GithubStatusChecks feature. The feature is on by default and posts checks once the CLI is authenticated with an Aspect credential and the Aspect Workflows GitHub App is installed.
GithubStatusChecks:
- Creates a check run on the commit as soon as the task starts
- Updates it with live build progress (target counts, failures) during the build
- Completes it with a pass/fail conclusion and a build summary including artifact download links
Set
—task:name explicitly on any invocation that uses GithubStatusChecks or ArtifactUpload. Status check names and uploaded artifact names are derived from the task name, so a stable, distinct value per invocation makes results identifiable (e.g. build, test). Without it, on CI the name is derived from the CI job name: renaming the CI job renames the check, and the shards of a GitHub Actions matrix all get the same name. Off CI it’s random per run.Authentication
GithubStatusChecks needs:
- An Aspect credential:
aspect-api-tokenon GitHub Actions, a Buildkite secret (secrets: [ASPECT_API_TOKEN]),ASPECT_API_TOKENin the environment on GitLab and CircleCI. - The Aspect Workflows GitHub App installed on the GitHub org/repository and linked to your Aspect account, so the CLI can use the App to post the check.
Troubleshooting
If no check appears, search the build log forGitHub status checks:. A missing credential logs one line per task naming what’s missing, for example on GitLab or CircleCI:
Artifact upload
TheArtifactUpload feature uploads build artifacts to the CI platform. All upload kinds are opt-in (off by default) because uploaded artifacts are accessible to anyone with repo read access.
Build logs (
upload_build_logs, values none / failed, default none) upload the full stdout and stderr of every failed build action to CI artifacts, the non-test counterpart to upload_test_logs. Each log has a provenance header (# target, # action, # primary output, # stream) and a target-based archive path (e.g. foo/bar/baz/Genrule.stderr.log). When enabled, GitHub / GitLab status checks surface a Build logs link alongside the existing Test logs link.
Enable permanently in config.axl:
ArtifactUpload does not use the Aspect Workflows GitHub App or ASPECT_API_TOKEN. It uploads to your CI platform’s native artifact storage using the runner’s own credentials: permissions: id-token: write on GitHub Actions, the Buildkite agent token, CI_JOB_TOKEN on GitLab, the CircleCI runner token. Make sure those credentials are present in the job environment. Supported platforms: Buildkite, CircleCI, GitHub Actions, GitLab.
