From c6495fa860a664bd25c1be87fd31f132d14b5684 Mon Sep 17 00:00:00 2001 From: Olivier Halligon Date: Fri, 12 May 2023 16:39:27 +0200 Subject: [PATCH] Use Buildkite emojis for Prototype Builds Instead of relying on the icon URL returned by App Center API, which is a URL that contains a signed token that is only valid for a certain amount of time and thus ends up making that URL invalid and the icon image unreachable after some time has passed (e.g. when you go back on older PRs) --- fastlane/lanes/build.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/fastlane/lanes/build.rb b/fastlane/lanes/build.rb index f63dc4bdbccb..e33fc04556d8 100644 --- a/fastlane/lanes/build.rb +++ b/fastlane/lanes/build.rb @@ -263,6 +263,7 @@ scheme: 'WordPress Alpha', output_app_name: 'WordPress Alpha', appcenter_app_name: 'WPiOS-One-Offs', + app_icon: ':wordpress:', # Use Buildkite emoji sentry_project_slug: SENTRY_PROJECT_SLUG_WORDPRESS ) end @@ -281,6 +282,7 @@ scheme: 'Jetpack', output_app_name: 'Jetpack Alpha', appcenter_app_name: 'jetpack-installable-builds', + app_icon: ':jetpack:', # Use Buildkite emoji sentry_project_slug: SENTRY_PROJECT_SLUG_JETPACK ) end @@ -313,7 +315,7 @@ def generate_prototype_build_number # Builds a Prototype Build for WordPress or Jetpack, then uploads it to App Center and comment with a link to it on the PR. # # rubocop:disable Metrics/AbcSize - def build_and_upload_prototype_build(scheme:, output_app_name:, appcenter_app_name:, sentry_project_slug:) + def build_and_upload_prototype_build(scheme:, output_app_name:, appcenter_app_name:, app_icon:, sentry_project_slug:) configuration = 'Release-Alpha' # Get the current build version, and update it if needed @@ -371,6 +373,7 @@ def build_and_upload_prototype_build(scheme:, output_app_name:, appcenter_app_na # Post PR Comment comment_body = prototype_build_details_comment( app_display_name: output_app_name, + app_icon: app_icon, app_center_org_name: APPCENTER_OWNER_NAME, metadata: { Configuration: configuration }, fold: true