Skip to content
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

BuildKite CI: Initial infrastructure for building pipelines #4801

Closed
4 tasks done
bkase opened this issue Apr 28, 2020 · 0 comments · Fixed by #4814
Closed
4 tasks done

BuildKite CI: Initial infrastructure for building pipelines #4801

bkase opened this issue Apr 28, 2020 · 0 comments · Fixed by #4814

Comments

@bkase
Copy link
Member

bkase commented Apr 28, 2020

Action items:

  • BuildKite connected to our repo
  • Dummy pipeline in place
  • Dhall types and functions for specifying jobs
  • A simple job

First part of #4763

Epic: #4762

@bkase bkase self-assigned this Apr 28, 2020
@bkase bkase linked a pull request Apr 30, 2020 that will close this issue
bkase added a commit that referenced this issue May 2, 2020
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 containing `transition` in it the pipeline executes as follows:

<img width="529" alt="Screen Shot 2020-04-29 at 8 10 50 PM" src="https://user-images.githubusercontent.com/515445/80659197-405eda00-8a56-11ea-895d-66850b194ef1.png">

And if your branch does not include such changed files:

<img width="529" alt="Screen Shot 2020-04-29 at 8 11 41 PM" src="https://user-images.githubusercontent.com/515445/80659217-4b196f00-8a56-11ea-8887-c802cde7250b.png">

## 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant