Allow overriding compose env for local builds#118
Open
zzak wants to merge 1 commit intorails:mainfrom
Open
Conversation
411d52c to
0fb6053
Compare
Now we can write this very simple pipeline for debugging builds locally.
```ruby
Buildkite::Builder.pipeline do
require "buildkite_config"
use Buildkite::Config::BuildContext
use Buildkite::Config::DockerBuild
use Buildkite::Config::RakeCommand
use Buildkite::Config::RubyGroup
plugin :docker_compose, "docker-compose#v4.16.0"
plugin :artifacts, "artifacts#v1.9.3"
build_context.setup_rubies %w(3.3)
group do
label "build"
build_context.rubies.each do |ruby|
builder ruby, compose: {
"cli_version": "2",
"image-name": "buildkite_base",
"cache-from": ["buildkite_base"],
"push": "",
"image-repository": "",
}
end
end
build_context.rubies.each do |ruby|
ruby_group ruby do
rake "actioncable", task: "test:integration", retry_on: { exit_status: -1, limit: 3 }, compose: {
"cli_version": "2",
"pull": "",
}, env: {
"IMAGE_NAME": "buildkite_base",
}
end
end
end
```
:nail_care: whitespace
0fb6053 to
d963c43
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Now we can write this very simple pipeline for debugging builds locally.
I needed this to run builds on a local VM, where I don't have access to a docker image host and a newer version of docker/compose.