-
-
Notifications
You must be signed in to change notification settings - Fork 77
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: update Aspect Workflows README (#386)
- Loading branch information
1 parent
ebe941f
commit 9bce23d
Showing
5 changed files
with
87 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
# Aspect Workflows demonstration deployment | ||
|
||
`bazel-examples` is a demonstration deployment of [Aspect Workflows](https://www.aspect.build/workflows) configured to run on Buildkite, CircleCI and GitHub Actions. | ||
|
||
You can see this Aspect Workflows demonstration deployment live for each CI host | ||
at the following URLS: | ||
|
||
- Buildkite: https://buildkite.com/aspect/bazel-examples | ||
- CircleCI: https://app.circleci.com/pipelines/github/aspect-build/bazel-examples-cci | ||
- GitHub Actions: https://github.com/aspect-build/bazel-examples-gha/actions/workflows/aspect-workflows.yaml | ||
|
||
## Aspect Workflows configuration yaml | ||
|
||
This is the [config.yaml](./config.yaml) file in this directory. | ||
|
||
## Buildkite pipeline configuration (in the Buildkite UI) | ||
|
||
There are two pipelines configured on Buildkite. | ||
|
||
1. Main build & test pipeline: https://buildkite.com/aspect/bazel-examples | ||
2. Scheduled warming pipeline: https://buildkite.com/aspect/bazel-examples-warming | ||
|
||
### Main build & test pipeline configuration | ||
|
||
The main build & test pipeline found at https://buildkite.com/aspect/bazel-examples is configured | ||
with the following yaml steps: | ||
|
||
``` | ||
steps: | ||
- label: ":aspect: Setup Aspect Workflows" | ||
commands: | ||
- "rosetta steps | buildkite-agent pipeline upload" | ||
agents: | ||
queue: aspect-small | ||
``` | ||
|
||
> [!IMPORTANT] | ||
> The Setup Aspect Workflows step above is configured to run on the `aspect-small` queue that is serviced by a runner group made up of lightweight and inexpensive `t3a.small` AWS instances. | ||
### Scheduled warming pipeline configuration | ||
|
||
The scheduled warming pipeline found at https://buildkite.com/aspect/bazel-examples-warming is | ||
configured with the following yaml steps: | ||
|
||
``` | ||
env: | ||
ASPECT_WORKFLOWS_BIN_DIR: /etc/aspect/workflows/bin | ||
steps: | ||
- label: ":fire: Create warming archives" | ||
commands: | | ||
echo "--- :aspect-build: Workflows environment" | ||
${ASPECT_WORKFLOWS_BIN_DIR}/configure_workflows_env | ||
echo "--- :stethoscope: Agent health check" | ||
${ASPECT_WORKFLOWS_BIN_DIR}/agent_health_check | ||
echo "--- :bazel: Create warming archive" | ||
rosetta run warming | ||
${ASPECT_WORKFLOWS_BIN_DIR}/warming_archive | ||
agents: | ||
queue: aspect-warming | ||
``` | ||
|
||
The warming pipeline is not configured to trigger on commits or PRs. Instead, it is triggered | ||
by a Buildkite pipeline schedule with the cron interval `0 1 * * 1-5 America/Los_Angeles`. It | ||
runs nightly on weekdays to create up-to-date warming archives containing cached external repositories. | ||
The most recent warming archive is restored during bootstrap of the "default" runner group to speed up | ||
the first build on cold runners. | ||
|
||
## GitHub Actions pipeline configuration | ||
|
||
This includes 3 files: | ||
|
||
1. [.github/workflows/aspect-workflows.yaml](../../.github/workflows/aspect-workflows.yaml) : Aspect Workflows CI workflow | ||
|
||
1. [.github/workflows/aspect-workflows-warming.yaml](../../.github/workflows/aspect-workflows-warming.yaml) : Aspect Workflows warming cron workflow | ||
|
||
1. [.github/workflows/.aspect-workflows-reusable.yaml](../../.github/workflows/.aspect-workflows-reusable.yaml) : Aspect Workflows Reusable Workflow for GitHub Actions. | ||
This files is vendored from the upstream [.aspect-workflows-reusable.yaml](https://github.com/aspect-build/workflows-action/blob/main/.github/workflows/.aspect-workflows-reusable.yaml) for the Workflows version configured in the deployment. | ||
|
||
## CircleCI pipeline configuration (generated) | ||
|
||
The CircleCI pipeline configuration, [.circleci/config.yml](../../.circleci/config.yml), is generated by the Aspect Workflows `rosetta` tool. | ||
|
||
`rosetta` is fetched by Bazel as a WORKSPACE dep (defined in [.aspect/workflows/deps.bzl](./deps.bzl)). | ||
The BUILD file targets to generate the CircleCI pipeline from the Aspect Workflows [config.yaml](./config.yaml) and a demostration user CircleCI configuration, [.circleci/user.yml](../../.circleci/user.yml), for non-Workflows steps are defined in [.circleci/BUILD.bazel](../../.circleci/BUILD.bazel) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
# See https://docs.aspect.build/workflows/configuration | ||
tasks: | ||
- checkout: | ||
update_strategy: rebase | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.