Skip to content

Commit 859e600

Browse files
committed
Break out of rosetta generated steps and GitHub Actions re-usable Workflows in preparation for AXL tasks
1 parent cfa7bba commit 859e600

File tree

12 files changed

+603
-780
lines changed

12 files changed

+603
-780
lines changed

.aspect/workflows/README.md

Lines changed: 18 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ at the following URLS:
88
- Buildkite: https://buildkite.com/aspect/bazel-examples
99
- CircleCI: https://app.circleci.com/pipelines/github/aspect-build/bazel-examples-cci
1010
- GitHub Actions: https://github.com/aspect-build/bazel-examples-gha/actions/workflows/aspect-workflows.yaml
11+
- GitLab: https://gitlab.com/aspect-build/bazel-examples-gl/-/pipelines
1112

1213
## Aspect Workflows configuration yaml
1314

@@ -27,34 +28,36 @@ with the following yaml steps:
2728

2829
```
2930
steps:
30-
- label: ":aspect: Setup Aspect Workflows"
31+
- label: ":aspect: Upload .aspect/workflows/buildkite.yaml"
3132
commands:
32-
- "rosetta steps | buildkite-agent pipeline upload"
33+
- buildkite-agent pipeline upload .aspect/workflows/buildkite.yaml
34+
plugins:
35+
- git-ssh-checkout#v0.4.1
36+
- sparse-checkout#v1.1.0:
37+
paths:
38+
- .aspect
3339
agents:
34-
queue: aspect-small
40+
queue: bk-small
3541
```
3642

37-
> [!IMPORTANT]
38-
> 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.
43+
This uploads the Buildkite pipeline defined in [.aspect/workflows/buildkite.yaml](./buildkite.yaml).
3944

4045
### Scheduled warming pipeline configuration
4146

4247
The scheduled warming pipeline found at https://buildkite.com/aspect/bazel-examples-warming is
4348
configured with the following yaml steps:
4449

4550
```
46-
env:
47-
ASPECT_WORKFLOWS_BIN_DIR: /etc/aspect/workflows/bin
4851
steps:
4952
- label: ":fire: Create warming archives"
5053
commands: |
5154
echo "--- :aspect-build: Workflows environment"
52-
${ASPECT_WORKFLOWS_BIN_DIR}/configure_workflows_env
55+
/etc/aspect/workflows/bin/configure_workflows_env
5356
echo "--- :stethoscope: Agent health check"
54-
${ASPECT_WORKFLOWS_BIN_DIR}/agent_health_check
55-
echo "--- :bazel: Create warming archive"
57+
/etc/aspect/workflows/bin/agent_health_check
58+
echo "--- :bazel: Create warming archive for ."
5659
rosetta run warming
57-
${ASPECT_WORKFLOWS_BIN_DIR}/warming_archive
60+
/etc/aspect/workflows/bin/warming_archive
5861
agents:
5962
queue: aspect-warming
6063
```
@@ -67,18 +70,14 @@ the first build on cold runners.
6770

6871
## GitHub Actions pipeline configuration
6972

70-
This includes 3 files:
71-
7273
1. [.github/workflows/aspect-workflows.yaml](../../.github/workflows/aspect-workflows.yaml) : Aspect Workflows CI workflow
7374

7475
1. [.github/workflows/aspect-workflows-warming.yaml](../../.github/workflows/aspect-workflows-warming.yaml) : Aspect Workflows warming cron workflow
7576

76-
1. [.github/workflows/.aspect-workflows-reusable.yaml](../../.github/workflows/.aspect-workflows-reusable.yaml) : Aspect Workflows Reusable Workflow for GitHub Actions.
77-
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.
77+
## CircleCI pipeline configuration
7878

79-
## CircleCI pipeline configuration (generated)
79+
The CircleCI pipeline is defined in [.circleci/config.yml](../../.circleci/config.yml).
8080

81-
The CircleCI pipeline configuration, [.circleci/config.yml](../../.circleci/config.yml), is generated by the Aspect Workflows `rosetta` tool.
81+
## GitLab pipeline configuration
8282

83-
`rosetta` is fetched by Bazel as a WORKSPACE dep (defined in [.aspect/workflows/deps.bzl](./deps.bzl)).
84-
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)
83+
The GitLab pipeline is defined in [.gitlab-ci.yml](../../.gitlab-ci.yml).

.aspect/workflows/buildkite.yaml

Lines changed: 195 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,195 @@
1+
steps:
2+
- key: gazelle
3+
label: ":deer: Gazelle"
4+
retry:
5+
manual:
6+
allowed: true
7+
permit_on_passed: false
8+
automatic:
9+
- limit: 1
10+
exit_status: 36
11+
- limit: 1
12+
exit_status: 255
13+
- limit: 1
14+
exit_status: -1
15+
agents:
16+
queue: aspect-default
17+
command: |
18+
echo "--- :aspect-build: Workflows environment"
19+
/etc/aspect/workflows/bin/configure_workflows_env
20+
echo "--- :stethoscope: Agent health check"
21+
/etc/aspect/workflows/bin/agent_health_check
22+
echo "~~~ :broom: Prepare archive directories"
23+
rm -rf /workflows/artifacts /workflows/testlogs
24+
echo "--- :deer: Gazelle"
25+
rosetta run gazelle
26+
artifact_paths:
27+
- "/workflows/artifacts/**/*"
28+
29+
- key: buildifier
30+
label: ":hammer_and_wrench: Buildifier"
31+
retry:
32+
manual:
33+
allowed: true
34+
permit_on_passed: false
35+
automatic:
36+
- limit: 1
37+
exit_status: 36
38+
- limit: 1
39+
exit_status: 255
40+
- limit: 1
41+
exit_status: -1
42+
agents:
43+
queue: aspect-default
44+
command: |
45+
echo "--- :aspect-build: Workflows environment"
46+
/etc/aspect/workflows/bin/configure_workflows_env
47+
echo "--- :stethoscope: Agent health check"
48+
/etc/aspect/workflows/bin/agent_health_check
49+
echo "~~~ :broom: Prepare archive directories"
50+
rm -rf /workflows/artifacts /workflows/testlogs
51+
echo "--- :hammer_and_wrench: Buildifier"
52+
rosetta run buildifier
53+
artifact_paths:
54+
- "/workflows/artifacts/**/*"
55+
56+
- key: lint
57+
label: ":broom: Lint"
58+
retry:
59+
manual:
60+
allowed: true
61+
permit_on_passed: false
62+
automatic:
63+
- limit: 1
64+
exit_status: 36
65+
- limit: 1
66+
exit_status: 255
67+
- limit: 1
68+
exit_status: -1
69+
agents:
70+
queue: aspect-default
71+
command: |
72+
echo "--- :aspect-build: Workflows environment"
73+
/etc/aspect/workflows/bin/configure_workflows_env
74+
echo "--- :stethoscope: Agent health check"
75+
/etc/aspect/workflows/bin/agent_health_check
76+
echo "~~~ :broom: Prepare archive directories"
77+
rm -rf /workflows/artifacts /workflows/testlogs
78+
echo "--- :broom: Lint"
79+
rosetta run lint
80+
artifact_paths:
81+
- "/workflows/artifacts/**/*"
82+
83+
- key: format
84+
label: ":hammer_and_wrench: Format"
85+
retry:
86+
manual:
87+
allowed: true
88+
permit_on_passed: false
89+
automatic:
90+
- limit: 1
91+
exit_status: 36
92+
- limit: 1
93+
exit_status: 255
94+
- limit: 1
95+
exit_status: -1
96+
agents:
97+
queue: aspect-default
98+
command: |
99+
echo "--- :aspect-build: Workflows environment"
100+
/etc/aspect/workflows/bin/configure_workflows_env
101+
echo "--- :stethoscope: Agent health check"
102+
/etc/aspect/workflows/bin/agent_health_check
103+
echo "~~~ :broom: Prepare archive directories"
104+
rm -rf /workflows/artifacts /workflows/testlogs
105+
echo "--- :hammer_and_wrench: Format"
106+
rosetta run format
107+
artifact_paths:
108+
- "/workflows/artifacts/**/*"
109+
110+
- key: test_0
111+
label: ":bazel: Test"
112+
retry:
113+
manual:
114+
allowed: true
115+
permit_on_passed: false
116+
automatic:
117+
- limit: 1
118+
exit_status: 36
119+
- limit: 1
120+
exit_status: 255
121+
- limit: 1
122+
exit_status: -1
123+
agents:
124+
queue: aspect-default
125+
command: |
126+
echo "--- :aspect-build: Workflows environment"
127+
/etc/aspect/workflows/bin/configure_workflows_env
128+
echo "--- :stethoscope: Agent health check"
129+
/etc/aspect/workflows/bin/agent_health_check
130+
echo "~~~ :broom: Prepare archive directories"
131+
rm -rf /workflows/artifacts /workflows/testlogs
132+
echo "--- :bazel: Test"
133+
rosetta run test_0
134+
artifact_paths:
135+
- "/workflows/artifacts/**/*"
136+
137+
- key: test_1
138+
label: ":bazel: Test (1)"
139+
retry:
140+
manual:
141+
allowed: true
142+
permit_on_passed: false
143+
automatic:
144+
- limit: 1
145+
exit_status: 36
146+
- limit: 1
147+
exit_status: 255
148+
- limit: 1
149+
exit_status: -1
150+
agents:
151+
queue: aspect-default
152+
command: |
153+
echo "--- :aspect-build: Workflows environment"
154+
/etc/aspect/workflows/bin/configure_workflows_env
155+
echo "--- :stethoscope: Agent health check"
156+
/etc/aspect/workflows/bin/agent_health_check
157+
echo "~~~ :broom: Prepare archive directories"
158+
rm -rf /workflows/artifacts /workflows/testlogs
159+
echo "--- :bazel: Test (1)"
160+
rosetta run test_1
161+
artifact_paths:
162+
- "/workflows/artifacts/**/*"
163+
164+
- key: delivery
165+
if: build.branch == "main"
166+
label: ":bazel: Delivery"
167+
retry:
168+
manual:
169+
allowed: true
170+
permit_on_passed: false
171+
automatic:
172+
- limit: 1
173+
exit_status: 36
174+
- limit: 1
175+
exit_status: 255
176+
- limit: 1
177+
exit_status: -1
178+
agents:
179+
queue: aspect-default
180+
command: |
181+
echo "--- :aspect-build: Workflows environment"
182+
/etc/aspect/workflows/bin/configure_workflows_env
183+
echo "--- :stethoscope: Agent health check"
184+
/etc/aspect/workflows/bin/agent_health_check
185+
echo "~~~ :broom: Prepare archive directories"
186+
rm -rf /workflows/artifacts /workflows/testlogs
187+
echo "--- :bazel: Delivery manifest"
188+
rosetta run delivery_manifest
189+
echo "--- :bazel: Delivery"
190+
rosetta run delivery
191+
depends_on:
192+
- test_0
193+
- test_1
194+
artifact_paths:
195+
- "/workflows/artifacts/**/*"

.aspect/workflows/config.yaml

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,36 @@
1-
# See https://docs.aspect.build/workflows/configuration
1+
# See https://docs.aspect.build/aspect-workflows/additional-materials/reference-config
22
tasks:
3-
- checkout:
4-
update_strategy: rebase
53
- gazelle:
64
- buildifier:
75
- lint:
86
- format:
97
- test:
8+
id: test_0
109
targets:
1110
- //...
11+
- -//angular/...
1212
- -//speller/...
1313
bazel:
1414
flags:
15-
- --config=rbe
16-
- --test_tag_filters=-skip-on-aspect-workflows
17-
coverage:
18-
codecov_upload: true
15+
- --config=rbe
16+
- --test_tag_filters=-skip-on-aspect-workflows
17+
- test:
18+
id: test_1
19+
targets:
20+
- //angular/...
21+
bazel:
22+
flags:
23+
- --config=rbe
24+
- --test_tag_filters=-skip-on-aspect-workflows
1925
- delivery:
20-
branches:
21-
- main
22-
- 'release-.*'
2326
auto_deliver: true
2427
stamp_flags:
2528
- --config=release
2629
rules:
2730
- deliverable: 'kind("oci_push rule", //...)'
31+
condition:
32+
branches:
33+
- '^main$'
34+
- '^release-.*$'
2835
notifications:
2936
github: {}

.aspect/workflows/deps.lock.json

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -51,37 +51,5 @@
5151
"cpu": "x86_64"
5252
}
5353
]
54-
},
55-
"rosetta": {
56-
"binaries": [
57-
{
58-
"kind": "file",
59-
"os": "linux",
60-
"cpu": "arm64",
61-
"url": "https://static.aspect.build/aspect/5.11.0/rosetta_real_linux_arm64",
62-
"sha256": "ab0b1c12093d91d327359f5d7fe0b0f1a3e8d59a242075624bafba9c24ac7d25"
63-
},
64-
{
65-
"kind": "file",
66-
"os": "linux",
67-
"cpu": "x86_64",
68-
"url": "https://static.aspect.build/aspect/5.11.0/rosetta_real_linux_x86_64",
69-
"sha256": "5a00dac4eb2c99aef30c71a1fa2678a7733206f20193a9b5dfc656cd1e388364"
70-
},
71-
{
72-
"kind": "file",
73-
"os": "macos",
74-
"cpu": "arm64",
75-
"url": "https://static.aspect.build/aspect/5.11.0/rosetta_real_darwin_arm64",
76-
"sha256": "ce659dc6ca6e9e973d4b3e6264ea30d05a2d13ae8419ee9615e1e4e7ebf0309f"
77-
},
78-
{
79-
"kind": "file",
80-
"os": "macos",
81-
"cpu": "x86_64",
82-
"url": "https://static.aspect.build/aspect/5.11.0/rosetta_real_darwin_x86_64",
83-
"sha256": "e55e92c6f2f741859b044fc6bb03f545e270a5ed339339dbfa3f27e15dfa3be1"
84-
}
85-
]
8654
}
8755
}

.circleci/BUILD.bazel

Lines changed: 0 additions & 30 deletions
This file was deleted.

0 commit comments

Comments
 (0)