Skip to content

Commit 89ddf20

Browse files
committed
Include build_id in push
1 parent e8ece5f commit 89ddf20

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

lib/buildkite/config/docker_build.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ def build_push(build_context)
3737
build_context.local_branch =~ /:/ ?
3838
build_context.image_name_for("pr-#{build_context.pull_request}") :
3939
build_context.image_name_for("br-#{build_context.local_branch}"),
40+
build_context.image_name_for(build_context.build_id)
4041
]
4142
end
4243
end

test/buildkite_config/test_docker_build.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ def test_builder_compose_plugin_self_hosted
9898
assert_includes compose, key
9999
end
100100
assert_equal ["base:buildkite-config-base:3-2-br-main"], compose["cache-from"]
101-
assert_equal ["base:buildkite-config-base:3-2-br-"], compose["push"]
101+
assert_equal ["base:buildkite-config-base:3-2-br-", "base:buildkite-config-base:3-2-local"], compose["push"]
102102

103103
assert_equal "base", compose["build"]
104104
assert_equal ".buildkite/docker-compose.yml", compose["config"]
@@ -229,7 +229,7 @@ def test_builder_gem_version_self_hosted
229229
}.fetch(plugins_map[:compose])
230230

231231
assert_equal ["base:buildkite-config-base:ruby-1-9-3-br-main"], compose["cache-from"]
232-
assert_equal ["base:buildkite-config-base:ruby-1-9-3-br-"], compose["push"]
232+
assert_equal ["base:buildkite-config-base:ruby-1-9-3-br-", "base:buildkite-config-base:ruby-1-9-3-local"], compose["push"]
233233
ensure
234234
ENV["BUILDKITE_COMPUTE_TYPE"] = @before_env_compute_type
235235
end

0 commit comments

Comments
 (0)