-
Notifications
You must be signed in to change notification settings - Fork 538
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
Scaffold for buildkite CI. Fixes #4801 #4814
Conversation
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.
some initial feedback on dhall code
.buildkite/src/Lib/Map.dhall
Outdated
-- Maps are lists of special "entry" records. This is made explicit here | ||
let Entry = { Type = \(value: Type) -> { mapKey : Text, mapValue : value } } in | ||
{ Entry = Entry, Type = \(value : Type) -> List (Entry.Type value) } | ||
|
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.
Prelude provides this functionality in it's map related exports. See Prelude.Map.Type
and Prelude.Map.Entry
.
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.
wow how did I miss that
Pipeline.Config::{ | ||
spec = ./Spec.dhall, | ||
steps = [ | ||
Command.Config::{ command = [ "echo \"hello\"" ], label = "Test Echo", key = "hello", target = <Large | Small>.Small } |
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.
You should make an alias for this size union so that you don't have to always use this syntax.
-- Add any new jobs here | ||
[ | ||
./jobs/Sample/Spec.dhall, | ||
./jobs/Sample2/Spec.dhall |
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.
Should we auto-gen this dhall file?
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.
Yes, but I'll add a TODO for that and we can do it later
@yourbuddyconner ✅ ? @mrmr1993 ✅ ? |
Preview: Built with commit 9b6ce4c |
Initial scaffolding for BuildKite CI system
Summary
For now, builds are generated manually, but it is very easy to trigger them automatically on PRs.
There is no infrastructure for running build agents yet -- so to iterate on builds you can run an agent locally. I have included an
agent.nix
with instructions on how to run the agent on your own computer.Currently, the agents do not shell out to docker containers so make sure you have installed the environment necessary to run your pipeline before running your agent.
It works
Included are two samples with separate "dirtyWhen" filters. When the branch includes changes from something in
src/lib
or a file containingtransition
in it the pipeline executes as follows:And if your branch does not include such changed files:
Implementation
Pipelines are defined in Dhall. To support monorepo triaging, there is one top-level pipeline that dynamically pushes individual "Job"s to buildkite when a dirtyWhen trigger occurs.
BuildKite talks to
.buildkite/pipeline.dhall
which loads./.buildkite/src/Monorepo.dhall
. Jobs are defined in./.buildkite/src/jobs/
and two sample jobs are provided as a reference.Inline comments in the Dhall code can provide more background.
Note that detecting dirty files is handled through the
scripts/generate_diff.sh
script.Epic: #4762