-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pull out common pieces of yaml in the buildkite pipeline #976
base: master
Are you sure you want to change the base?
Changes from all commits
d13f854
257a9bc
d57effb
10f2b66
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,59 @@ | ||
env: | ||
FORCE_COLOR: 1 | ||
GIT_TERMINAL_PROMPT: 0 | ||
queues: | ||
- &chromium_queue | ||
runtimeType: chromiumbuild | ||
queue: runtime | ||
- &linux_agent_queue | ||
<<: *chromium_queue | ||
os: linux | ||
- &windows_agent_queue | ||
<<: *chromium_queue | ||
os: windows | ||
- &mac_agent_queue | ||
<<: *chromium_queue | ||
os: macos | ||
|
||
steps: | ||
- label: "Build chromium - Linux" | ||
key: "build-chromium-linux-x86_64" | ||
timeout_in_minutes: 60 | ||
plugins: | ||
- &aws_sm_plugin | ||
seek-oss/aws-sm#v2.3.1: | ||
region: us-east-2 | ||
env: | ||
BUILDEVENT_APIKEY: honeycomb-api-key | ||
BUILDEVENT_BUILDKITE_API_TOKEN: buildkite-api-token-honeycomb-build-events | ||
- &buildevents_plugin | ||
replayio/buildevents#adb8a05: ~ | ||
|
||
- &linux_plugins | ||
plugins: | ||
- thedyrt/skip-checkout#v0.1.1: | ||
cd: /home/ubuntu/chromium/src | ||
- seek-oss/aws-sm#v2.3.1: | ||
region: us-east-2 | ||
env: | ||
BUILDEVENT_APIKEY: honeycomb-api-key | ||
BUILDEVENT_BUILDKITE_API_TOKEN: buildkite-api-token-honeycomb-build-events | ||
- replayio/buildevents#adb8a05: ~ | ||
- *aws_sm_plugin | ||
- *buildevents_plugin | ||
- &mac_plugins | ||
plugins: | ||
- thedyrt/skip-checkout#v0.1.1: | ||
cd: /Users/administrator/chromium/src | ||
- *aws_sm_plugin | ||
- *buildevents_plugin | ||
- &windows_plugins | ||
plugins: | ||
- https://github.com/jazzdan/skip-checkout-buildkite-plugin.git#jazzdan/windows-support: ~ | ||
|
||
environments: | ||
- &goma_env | ||
GOMA_SERVER_HOST: simpsonite.goma.engflow.com | ||
GOMACTL_USE_PROXY: false | ||
- &linux_env | ||
<<: *goma_env | ||
RECORD_REPLAY_BACKEND_DIR: /home/ubuntu/chromium/backend | ||
- &mac_env | ||
<<: *goma_env | ||
RECORD_REPLAY_BACKEND_DIR: /Users/administrator/chromium/backend | ||
- &windows_env | ||
<<: *goma_env | ||
RECORD_REPLAY_BACKEND_DIR: "C:\\Users\\Administrator\\chromium\\backend" | ||
|
||
commands: | ||
- &buck2_build | ||
commands: | ||
- "be_cmd git-fetch-all -- git fetch --all" | ||
- "be_cmd git-reset-branch -- git reset --hard origin/$BUILDKITE_BRANCH" | ||
|
@@ -23,28 +62,7 @@ steps: | |
- "be_cmd buck2-kill -- buck2 kill" | ||
- "be_cmd buck2-build -- buck2 build --console simple //:chromium" | ||
- "popd" | ||
env: | ||
GOMA_SERVER_HOST: simpsonite.goma.engflow.com | ||
GOMACTL_USE_PROXY: false | ||
RECORD_REPLAY_BACKEND_DIR: /home/ubuntu/chromium/backend | ||
agents: | ||
- "runtimeType=chromiumbuild" | ||
- "os=linux" | ||
- "queue=runtime" | ||
artifact_paths: | ||
- "build_id/linux/x86_64/**" | ||
- label: "Build chromium - Mac (x86)" | ||
key: "build-chromium-mac-x86_64" | ||
timeout_in_minutes: 60 | ||
plugins: | ||
- thedyrt/skip-checkout#v0.1.1: | ||
cd: /Users/administrator/chromium/src | ||
- seek-oss/aws-sm#v2.3.1: | ||
region: us-east-2 | ||
env: | ||
BUILDEVENT_APIKEY: honeycomb-api-key | ||
BUILDEVENT_BUILDKITE_API_TOKEN: buildkite-api-token-honeycomb-build-events | ||
- replayio/buildevents#adb8a05: ~ | ||
- &buckle_build | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. q: is there a reason not to use buckle everywhere? that would make it so we can reuse the same build command sequence across linux/macos. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. the buck2/buckle build anchors are identical except for two lines. in fact except for two words. This is another place where yaml list merging (and string concatenation) would help a bunch. I didn't really want to create anchors for each shared command here, like I did up in There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Eventually we'll be able to use buckle everywhere, but there's currently a bug in the Windows version benbrittain/buckle#21 |
||
commands: | ||
- "be_cmd git-fetch-all -- git fetch --all" | ||
- "be_cmd git-reset-branch -- git reset --hard origin/$BUILDKITE_BRANCH" | ||
|
@@ -53,86 +71,68 @@ steps: | |
- "be_cmd buck2-kill -- buckle kill" | ||
- "be_cmd buck2-build -- buckle build --console simple //:chromium" | ||
- "popd" | ||
env: | ||
GOMA_SERVER_HOST: simpsonite.goma.engflow.com | ||
GOMACTL_USE_PROXY: false | ||
RECORD_REPLAY_BACKEND_DIR: /Users/administrator/chromium/backend | ||
agents: | ||
- "runtimeType=chromiumbuild" | ||
- "os=macos" | ||
- "queue=runtime" | ||
|
||
|
||
env: | ||
FORCE_COLOR: 1 | ||
GIT_TERMINAL_PROMPT: 0 | ||
|
||
steps: | ||
- label: "Build chromium - Linux" | ||
key: "build-chromium-linux-x86_64" | ||
timeout_in_minutes: 60 | ||
agents: *linux_agent_queue | ||
env: *linux_env | ||
<<: *linux_plugins | ||
<<: *buck2_build | ||
artifact_paths: | ||
- "build_id/linux/x86_64/**" | ||
|
||
- label: "Build chromium - Mac (x86)" | ||
key: "build-chromium-mac-x86_64" | ||
timeout_in_minutes: 60 | ||
agents: *mac_agent_queue | ||
env: *mac_env | ||
<<: *mac_plugins | ||
<<: *buckle_build | ||
artifact_paths: | ||
- "build_id/macOS/x86_64/**" | ||
|
||
- label: "Build chromium - Mac (arm64)" | ||
key: "build-chromium-mac-arm64" | ||
timeout_in_minutes: 60 | ||
plugins: | ||
- thedyrt/skip-checkout#v0.1.1: | ||
cd: /Users/administrator/chromium/src | ||
- seek-oss/aws-sm#v2.3.1: | ||
region: us-east-2 | ||
env: | ||
BUILDEVENT_APIKEY: honeycomb-api-key | ||
BUILDEVENT_BUILDKITE_API_TOKEN: buildkite-api-token-honeycomb-build-events | ||
- replayio/buildevents#adb8a05: ~ | ||
commands: | ||
- "be_cmd git-fetch-all -- git fetch --all" | ||
- "be_cmd git-reset-branch -- git reset --hard origin/$BUILDKITE_BRANCH" | ||
- "be_cmd update-all-repos -- node replay_build_scripts/update-all-repos.mjs" | ||
- "pushd ../backend" | ||
- "be_cmd buck2-kill -- buckle kill" | ||
- "be_cmd buck2-build -- buckle build --console simple //:chromium" | ||
- "popd" | ||
env: | ||
GOMA_SERVER_HOST: simpsonite.goma.engflow.com | ||
GOMACTL_USE_PROXY: false | ||
agents: *mac_agent_queue | ||
env: | ||
<<: *mac_env | ||
REPLAY_BUILD_ARM: true | ||
RECORD_REPLAY_BACKEND_DIR: /Users/administrator/chromium/backend | ||
agents: | ||
- "runtimeType=chromiumbuild" | ||
- "os=macos" | ||
- "queue=runtime" | ||
<<: *mac_plugins | ||
<<: *buckle_build | ||
artifact_paths: | ||
- "build_id/macOS/arm64/**" | ||
|
||
- label: "Build chromium - Windows" | ||
key: "build-chromium-windows" | ||
timeout_in_minutes: 60 | ||
plugins: | ||
- https://github.com/jazzdan/skip-checkout-buildkite-plugin.git#jazzdan/windows-support: ~ | ||
agents: *windows_agent_queue | ||
env: *windows_env | ||
<<: *windows_plugins | ||
command: "cd C:\\Users\\Administrator\\chromium\\src && git fetch --all && git reset --hard origin/$BUILDKITE_BRANCH && node replay_build_scripts/update-all-repos.mjs && node buildWindows.mjs && node replay_build_scripts/upload_build_artifacts.mjs" | ||
env: | ||
GOMA_SERVER_HOST: simpsonite.goma.engflow.com | ||
GOMACTL_USE_PROXY: false | ||
RECORD_REPLAY_BACKEND_DIR: "C:\\Users\\Administrator\\chromium\\backend" | ||
agents: | ||
- "runtimeType=chromiumbuild" | ||
- "os=windows" | ||
- "queue=runtime" | ||
artifact_paths: | ||
- "build_id/windows/x86_64/**" | ||
|
||
- trigger: "testing-runtime-e2e" | ||
label: ":hammer: Trigger Runtime Tests" | ||
depends_on: | ||
- "build-chromium-linux-x86_64" | ||
- "build-chromium-mac-x86_64" | ||
- "build-chromium-mac-arm64" | ||
|
||
- label: "Metabase Test Suite" | ||
key: "metabase-test-suite" | ||
agents: *linux_agent_queue | ||
<<: *linux_plugins | ||
depends_on: "build-chromium-linux-x86_64" | ||
if: build.branch == "master" | ||
agents: | ||
- "runtimeType=chromiumbuild" | ||
- "os=linux" | ||
- "queue=runtime" | ||
plugins: | ||
- thedyrt/skip-checkout#v0.1.1: ~ | ||
- seek-oss/aws-sm#v2.3.1: | ||
region: us-east-2 | ||
env: | ||
GITHUB_AUTH_SECRET: "prod/metabase-github-secret" | ||
BUILDEVENT_APIKEY: honeycomb-api-key | ||
BUILDEVENT_BUILDKITE_API_TOKEN: buildkite-api-token-honeycomb-build-events | ||
- replayio/buildevents#adb8a05: ~ | ||
command: "be_cmd metabase-tests -- /home/ubuntu/chromium/src/replay_build_scripts/metabase.sh" | ||
|
||
# wait for all steps above, but also continue if they fail | ||
|
@@ -141,17 +141,6 @@ steps: | |
|
||
- label: "Buildevents Watch" | ||
key: "buildevents-watch" | ||
plugins: | ||
- thedyrt/skip-checkout#v0.1.1: | ||
cd: /home/ubuntu/chromium/src | ||
- seek-oss/aws-sm#v2.3.1: | ||
region: us-east-2 | ||
env: | ||
BUILDEVENT_APIKEY: honeycomb-api-key | ||
BUILDEVENT_BUILDKITE_API_TOKEN: buildkite-api-token-honeycomb-build-events | ||
- replayio/buildevents#adb8a05: ~ | ||
agents: *linux_agent_queue | ||
<<: *linux_plugins | ||
command: "be_watch" | ||
agents: | ||
- "runtimeType=chromiumbuild" | ||
- "os=linux" | ||
- "queue=runtime" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ideally I would be able to express this as:
and then reference the anchored list below like:
but alas, that isn't valid yaml. instead each plugin needs its own anchor and those get mentioned individually in the os plugins lists.