Skip to content

Commit ee9b7d9

Browse files
committed
Run buildkite_pipeline_upload on branch HEAD
1 parent 5aa207d commit ee9b7d9

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

fastlane/lanes/release.rb

+8-2
Original file line numberDiff line numberDiff line change
@@ -336,8 +336,14 @@ def trigger_buildkite_release_build(branch:, beta:)
336336
if is_ci
337337
buildkite_pipeline_upload(
338338
pipeline_file: File.join(PROJECT_ROOT_FOLDER, '.buildkite', pipeline_file_name),
339-
# Both keys and values need to be passed as strings
340-
environment: environment.to_h { |k, v| [k.to_s, v.to_s] }
339+
environment:
340+
# Override the commit to make sure it runs on the latest state,
341+
# not the commit that triggered the automation that eventaully called this.
342+
#
343+
# Useful during release automation builds that make additional commits to the release branch.
344+
{ **environment, BUILDKITE_COMMIT: last_git_commit[:commit_hash] }
345+
# Both keys and values need to be passed as strings
346+
.to_h { |k, v| [k.to_s, v.to_s] }
341347
)
342348
else
343349
build_url = buildkite_trigger_build(

0 commit comments

Comments
 (0)