Skip to content

Commit

Permalink
Annotate CI release management builds with links to PRs
Browse files Browse the repository at this point in the history
  • Loading branch information
mokagio committed Dec 8, 2023
1 parent 68f7cc7 commit 2d316a1
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 4 deletions.
7 changes: 6 additions & 1 deletion fastlane/lanes/localization.rb
Original file line number Diff line number Diff line change
Expand Up @@ -205,10 +205,15 @@

push_to_git_remote(tags: false)

create_release_management_pull_request(
pr_url = create_release_management_pull_request(
base_branch: compute_release_branch_name(options:, version: release_version),
title: "Merge editorialized release notes in #{release_version}"
)

message = <<~MESSAGE
Release notes and metadata localization sources successfully generated. Next, review and merge the [integration PR](#{pr_url}).
MESSAGE
buildkite_annotate(context: 'editorialization-completed', style: 'success', message:) if is_ci
end

# Updates the `AppStoreStrings.po` file for WordPress, with the latest content from the `release_notes.txt` file and the other text sources
Expand Down
35 changes: 32 additions & 3 deletions fastlane/lanes/release.rb
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,17 @@

ios_check_beta_deps(podfile: File.join(PROJECT_ROOT_FOLDER, 'Podfile'))
print_release_notes_reminder

message = <<~MESSAGE
Code freeze started successfully.
Next steps:
- Checkout `#{release_branch_name}` branch locally
- Update pods and release notes
- Finalize the code freeze
MESSAGE
buildkite_annotate(context: 'code-freeze-success', style: 'success', message:) if is_ci
end

# Executes the final steps for the code freeze
Expand Down Expand Up @@ -147,10 +158,15 @@

trigger_beta_build

create_release_management_pull_request(
pr_url = create_release_management_pull_request(
base_branch: DEFAULT_BRANCH,
title: "Merge #{version} code freeze"
)

message = <<~MESSAGE
Code freeze completed successfully. Next, review and merge the [integration PR](#{pr_url}).
MESSAGE
buildkite_annotate(context: 'code-freeze-completed', style: 'success', message:) if is_ci
end

# Creates a new beta by bumping the app version appropriately then triggering a beta build on CI
Expand Down Expand Up @@ -204,7 +220,15 @@

trigger_beta_build

create_release_management_pull_request(base_branch: DEFAULT_BRANCH, title: "Merge changes from #{build_code_current}")
pr_url = create_release_management_pull_request(
base_branch: DEFAULT_BRANCH,
title: "Merge changes from #{build_code_current}"
)

message = <<~MESSAGE
Beta deployment was successful. Next, review and merge the [integration PR](#{pr_url}).
MESSAGE
buildkite_annotate(context: 'beta-completed', style: 'success', message:) if is_ci
end

lane :create_editorial_branch do |options|
Expand Down Expand Up @@ -362,10 +386,15 @@
create_new_milestone(repository: GITHUB_REPO)
close_milestone(repository: GITHUB_REPO, milestone: version)

create_release_management_pull_request(
pr_url = create_release_management_pull_request(
base_branch: DEFAULT_BRANCH,
title: "Merge #{version} release finalization"
)

message = <<~MESSAGE
Release successfully finalized. Next, review and merge the [integration PR](#{pr_url}).
MESSAGE
buildkite_annotate(context: 'finalization-completed', style: 'success', message:) if is_ci
end

# Triggers a beta build on CI
Expand Down

0 comments on commit 2d316a1

Please sign in to comment.