Skip to content

Conversation

@aidenhaak
Copy link

@aidenhaak aidenhaak commented Jan 6, 2022

Description

Added a Buildkite build agent so that GitVersion can use the BUILDKITE_BRANCH environment variable when running on a Buildkite agent.

Related Issue

Resolves #2956.

Motivation and Context

By default Buildkite checkout a branch in a headless state. This change removes the need for adding this at the start of a Buildkite pipeline:

git checkout $BUILDKITE_BRANCH
git reset HEAD --hard $BUILDKITE_COMMIT

How Has This Been Tested?

  • Added unit tests
  • Manually tested in a Buildkite pipeline

Please note I wasn't able to check my added documentation is valid as I got this error trying to run the build script:

❯ .\build.ps1 -Target Preview-Documentation
Running build stage build...

Tool Codecov.Tool is already installed, with required version.
Tool GitVersion.Tool is already installed, with required version.
Error: The target 'Preview-Documentation' was not found.

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@aidenhaak
Copy link
Author

Not sure what's going on with the documentation part of the build...any ideas @asbjornu ?

@asbjornu
Copy link
Member

@aidenhaak, good question. There's nothing in this PR that should cause the "Could not find module remark-frontmatter" failure. Ideas @arturcic?

@arturcic
Copy link
Member

@asbjornu it seems it's the [Remark Linting] step in the docs that are failing. If I remember correctly that was added by you some time ago as part of the docs validation. Can you check that?

@asbjornu
Copy link
Member

Yeah, I noticed that. I just can't think of a reason for it to suddenly stop working. I'll have a look.

@asbjornu asbjornu mentioned this pull request Jan 11, 2022
Copy link
Member

@asbjornu asbjornu left a comment

Choose a reason for hiding this comment

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

@aidenhaak, the build is now successful, but there are a few nitpicks pointed out by Reviewdog that would be great if you could fix. 🙏🏼

@aidenhaak
Copy link
Author

@asbjornu fixed! Worth squashing 1a2bd5a and 925ff8c together?

Copy link
Member

@asbjornu asbjornu left a comment

Choose a reason for hiding this comment

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

@aidenhaak, awesome! No squashing needed. :)

@asbjornu asbjornu merged commit debc84f into GitTools:main Jan 13, 2022
@mergify
Copy link
Contributor

mergify bot commented Jan 13, 2022

Thank you @aidenhaak for your contribution!

arturcic pushed a commit that referenced this pull request Jan 13, 2022
Merge pull request #2957 from aidenhaak/feature/buildkite

Add BuildKite build agent
@arturcic arturcic added this to the 5.x milestone Jan 24, 2022
@arturcic arturcic removed this from the 5.x milestone Feb 16, 2022
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.

[Feature] Add Buildkite build agent

3 participants