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

content: driving buildkite pipelines with CUE #23

Merged
merged 1 commit into from
Nov 29, 2023

Conversation

jpluscplusm
Copy link
Collaborator

as per commit.

@jpluscplusm
Copy link
Collaborator Author

@myitcv Please could you assign this cue-by-example a number in the index?

@jpluscplusm jpluscplusm force-pushed the jcm/buildkite/1 branch 2 times, most recently from 8f1bb6d to 492de86 Compare November 22, 2023 16:12
@jpluscplusm
Copy link
Collaborator Author

We've agreed that I should use index 006.

@jpluscplusm jpluscplusm requested a review from myitcv November 23, 2023 15:31
jpluscplusm added a commit to jpluscplusm-forks/cue-lang.cue-by-example that referenced this pull request Nov 28, 2023
This change adds a guide that takes the reader through the process of
making a static & known-good Buildkite pipeline dynamic.

It uses the steps contained in a Buildkite blog post to assemble the
known-good starting point and place the reader in a state where the
guide can inform them, without having to deal with too many branching
paths and possibilities.

It uses directories and CUE package names that are compatible with the
simpler static pipeline import guide proposed in
cue-labs#23. The two guides
haven't been explicitly designed to work together, apart from those
naming concerns - but nothing else stands out as being obviously
incompatible.

Signed-off-by: Jonathan Matthews <github@hello.jonathanmatthews.com>
jpluscplusm added a commit to jpluscplusm-forks/cue-lang.cue-by-example that referenced this pull request Nov 28, 2023
This change adds a guide that takes the reader through the process of
making a static & known-good Buildkite pipeline dynamic.

It uses the steps contained in a Buildkite blog post to assemble the
known-good starting point and place the reader in a state where the
guide can inform them, without having to deal with too many branching
paths and possibilities.

It uses directories and CUE package names that are compatible with the
simpler static pipeline import guide proposed in
cue-labs#23. The two guides haven't been explicitly
designed to work together, apart from those naming concerns - but
nothing else stands out as being obviously incompatible.

Signed-off-by: Jonathan Matthews <github@hello.jonathanmatthews.com>
jpluscplusm added a commit to jpluscplusm-forks/cue-lang.cue-by-example that referenced this pull request Nov 28, 2023
This change adds a guide that takes the reader through the process of
making a static & known-good Buildkite pipeline dynamic.

It uses the steps contained in a Buildkite blog post to assemble the
known-good starting point and place the reader in a state where the
guide can inform them, without having to deal with too many branching
paths and possibilities.

It uses directories and CUE package names that are compatible with the
simpler static pipeline import guide proposed in
cue-labs#23. The two guides haven't been explicitly
designed to work together, apart from those naming concerns - but
nothing else stands out as being obviously incompatible.

Signed-off-by: Jonathan Matthews <github@hello.jonathanmatthews.com>
jpluscplusm added a commit to jpluscplusm-forks/cue-lang.cue-by-example that referenced this pull request Nov 28, 2023
This change adds a guide that takes the reader through the process of
making a static & known-good Buildkite pipeline dynamic.

It uses the steps contained in a Buildkite blog post to assemble the
known-good starting point and place the reader in a state where the
guide can inform them, without having to deal with too many branching
paths and possibilities.

It uses directories and CUE package names that are compatible with the
simpler static pipeline import guide proposed in
cue-labs#23. The two guides haven't been explicitly
designed to work together, apart from those naming concerns - but
nothing else stands out as being obviously incompatible.

Signed-off-by: Jonathan Matthews <github@hello.jonathanmatthews.com>
jpluscplusm added a commit to jpluscplusm-forks/cue-lang.cue-by-example that referenced this pull request Nov 28, 2023
This change adds a guide that takes the reader through the process of
making a static & known-good Buildkite pipeline dynamic.

It uses the steps contained in a Buildkite blog post to assemble the
known-good starting point and place the reader in a state where the
guide can inform them, without having to deal with too many branching
paths and possibilities.

It uses directories and CUE package names that are compatible with the
simpler static pipeline import guide proposed in
cue-labs#23. The two guides haven't been explicitly
designed to work together, apart from those naming concerns - but
nothing else stands out as being obviously incompatible.

Signed-off-by: Jonathan Matthews <github@hello.jonathanmatthews.com>
jpluscplusm added a commit to jpluscplusm-forks/cue-lang.cue-by-example that referenced this pull request Nov 28, 2023
This change adds a guide that takes the reader through the process of
making a static & known-good Buildkite pipeline dynamic.

It uses the steps contained in a Buildkite blog post to assemble the
known-good starting point and place the reader in a state where the
guide can inform them, without having to deal with too many branching
paths and possibilities.

It uses directories and CUE package names that are compatible with the
simpler static pipeline import guide proposed in
cue-labs#23. The two guides haven't been explicitly
designed to work together, apart from those naming concerns - but
nothing else stands out as being obviously incompatible.

Closes cue-labs#21

Signed-off-by: Jonathan Matthews <github@hello.jonathanmatthews.com>
jpluscplusm added a commit to jpluscplusm-forks/cue-lang.cue-by-example that referenced this pull request Nov 28, 2023
This change adds a guide that takes the reader through the process of
making a static & known-good Buildkite pipeline dynamic.

It uses the steps contained in a Buildkite blog post to assemble the
known-good starting point and place the reader in a state where the
guide can inform them, without having to deal with too many branching
paths and possibilities.

It uses directories and CUE package names that are compatible with the
simpler static pipeline import guide proposed in
cue-labs#23. The two guides haven't been explicitly
designed to work together, apart from those naming concerns - but
nothing else stands out as being obviously incompatible.

Closes cue-labs#21

Signed-off-by: Jonathan Matthews <github@hello.jonathanmatthews.com>
jpluscplusm added a commit to jpluscplusm-forks/cue-lang.cue-by-example that referenced this pull request Nov 28, 2023
This change adds a guide that takes the reader through the process of
making a static & known-good Buildkite pipeline dynamic.

It uses the steps contained in a Buildkite blog post to assemble the
known-good starting point and place the reader in a state where the
guide can inform them, without having to deal with too many branching
paths and possibilities.

It uses directories and CUE package names that are compatible with the
simpler static pipeline import guide proposed in
cue-labs#23. The two guides haven't been explicitly
designed to work together, apart from those naming concerns - but
nothing else stands out as being obviously incompatible.

Closes cue-labs#21

Signed-off-by: Jonathan Matthews <github@hello.jonathanmatthews.com>
Copy link
Contributor

@myitcv myitcv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM with minor nits and questions.

# Driving Buildkite Pipelines with CUE
<sup>by [Jonathan Matthews](https://jonathanmatthews.com)</sup>

This guide explains how to convert Buildkite pipeline files from YAML to CUE,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a more precise name for what type of pipeline we are talking about here? Given our conversation yesterday?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not as far as I can see. The Buildkite glossary only mentions one type of pipeline - "Dynamic pipeline":

Dynamic pipelines define their steps at runtime using scripts ...

Given the terminology they use in the "dynamic pipelines" blog post, referring to picking the steps up from an in-repo file as a "static" pipeline ("Your first pipelines will most likely be static pipelines, built by defining a YAML file or similar on-disk configuration") I suspect they both don't distinguish between the semi-static and totally-static pipelines that we discussed, and neither do they focus on folks who use the totally-static kind. My reading of their docs and "new pipeline" wizard is that they'd like to lead the user to the semi-static flow - which I propose we refer to as "static", mirroring their blog post.

I'll update this PR to refer to them as "static pipeline [files]".

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Happy with that. One way to help here is to link to docs to confirm which one we are talking about (even if those docs don't actually use a specific name)

006_buildkite_importing_pipelines/README.md Show resolved Hide resolved
006_buildkite_importing_pipelines/README.md Show resolved Hide resolved
006_buildkite_importing_pipelines/README.md Show resolved Hide resolved
006_buildkite_importing_pipelines/README.md Show resolved Hide resolved
006_buildkite_importing_pipelines/README.md Show resolved Hide resolved
006_buildkite_importing_pipelines/README.md Show resolved Hide resolved
[Buildkite's documentation](https://buildkite.com/docs/pipelines/configuration-overview),
and place it in the `internal/ci/buildkite` directory:

:floppy_disk: `internal/ci/buildkite/buildkite.pipeline.schema.cue`
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Renamed to internal/ci/buildkite/pipelineSchema.cue

# Driving Buildkite Pipelines with CUE
<sup>by [Jonathan Matthews](https://jonathanmatthews.com)</sup>

This guide explains how to convert Buildkite pipeline files from YAML to CUE,
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

006_buildkite_importing_pipelines/README.md Show resolved Hide resolved
006_buildkite_importing_pipelines/README.md Show resolved Hide resolved
Here's a new cue-by-example, showing how to manage a set of Buildkite
pipeline files in CUE instead of YAML.

Because Buildkite (in its non-dynamic-pipeline mode) still needs to see
a YAML file serialised in the repo, the guide includes a CUE _tool that
turns the CUE back into YAML on demand.

It also includes a schema for the pipeline's representation, but this
schema is very trivial, and not hugely useful - it could do with
improving. I wasn't able to use the upstream schema
(https://github.com/buildkite/pipeline-schema) because of issues now
tracked as cue-lang/cue#2698 and cue-lang/cue#2699.

This is related to cue-labs#21 but doesn't /close/ it, as that issue tracks a
cue-by-example for Buildkite's "dynamic" pipeline mode, which this guide
doesn't address.

Signed-off-by: Jonathan Matthews <github@hello.jonathanmatthews.com>
jpluscplusm added a commit to jpluscplusm-forks/cue-lang.cue-by-example that referenced this pull request Nov 29, 2023
This change adds a guide that takes the reader through the process of
making a static & known-good Buildkite pipeline dynamic.

It uses the steps contained in a Buildkite blog post to assemble the
known-good starting point and place the reader in a state where the
guide can inform them, without having to deal with too many branching
paths and possibilities.

It uses directories and CUE package names that are compatible with the
simpler static pipeline import guide proposed in
cue-labs#23. The two guides haven't been explicitly
designed to work together, apart from those naming concerns - but
nothing else stands out as being obviously incompatible.

Closes cue-labs#21

Signed-off-by: Jonathan Matthews <github@hello.jonathanmatthews.com>
@jpluscplusm
Copy link
Collaborator Author

@myitcv all conversations resolved, except one which is only left open for your visibility. Please merge at your convenience!

@myitcv myitcv merged commit 9daef5f into cue-labs:main Nov 29, 2023
myitcv pushed a commit to jpluscplusm-forks/cue-lang.cue-by-example that referenced this pull request Nov 29, 2023
This change adds a guide that takes the reader through the process of
making a static & known-good Buildkite pipeline dynamic.

It uses the steps contained in a Buildkite blog post to assemble the
known-good starting point and place the reader in a state where the
guide can inform them, without having to deal with too many branching
paths and possibilities.

It uses directories and CUE package names that are compatible with the
simpler static pipeline import guide proposed in
cue-labs#23. The two guides haven't been explicitly
designed to work together, apart from those naming concerns - but
nothing else stands out as being obviously incompatible.

Closes cue-labs#21

Signed-off-by: Jonathan Matthews <github@hello.jonathanmatthews.com>
myitcv pushed a commit that referenced this pull request Nov 29, 2023
This change adds a guide that takes the reader through the process of
making a static & known-good Buildkite pipeline dynamic.

It uses the steps contained in a Buildkite blog post to assemble the
known-good starting point and place the reader in a state where the
guide can inform them, without having to deal with too many branching
paths and possibilities.

It uses directories and CUE package names that are compatible with the
simpler static pipeline import guide proposed in
#23. The two guides haven't been explicitly
designed to work together, apart from those naming concerns - but
nothing else stands out as being obviously incompatible.

Closes #21

Signed-off-by: Jonathan Matthews <github@hello.jonathanmatthews.com>
@jpluscplusm jpluscplusm deleted the jcm/buildkite/1 branch November 29, 2023 17:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants