Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add wear app to build pipeline #996

Merged
merged 1 commit into from
May 29, 2023
Merged

Conversation

mchowning
Copy link
Contributor

Description

Adding the the wear app to our build pipeline.

For reference, this is the PR adding the automotive build.

Testing Instructions

I don't know how to test this. Maybe @oguzkocer has some suggestions. Or we just merge it and see what happens when we try to run the release script on Monday, May 29.

Checklist

  • If this is a user-facing change, I have added an entry in CHANGELOG.md
  • I have considered whether it makes sense to add tests for my changes
  • All strings that need to be localized are in modules/services/localization/src/main/res/values/strings.xml
  • Any jetpack compose components I added or changed are covered by compose previews

@mchowning mchowning requested a review from a team as a code owner May 25, 2023 22:01
@mchowning mchowning requested a review from oguzkocer May 25, 2023 22:01
@mchowning mchowning added the [Area] Wear OS watch app label May 25, 2023
@mchowning
Copy link
Contributor Author

mchowning commented May 25, 2023

👋 @oguzkocer ! Can you look this over? I haven't tested this. Do you have any suggestions for how to test this, or do we just wait and see what happens when we run the release script?

I would like to get this merged before we do the 7.40 code freeze on Monday, May 29, if possible.

@mchowning mchowning force-pushed the update/add-wear-to-build-pipeline branch from 3452640 to b8287a4 Compare May 25, 2023 22:06
@oguzkocer oguzkocer self-assigned this May 26, 2023
Copy link
Contributor

@oguzkocer oguzkocer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mchowning This looks good to me. We can probably improve the syntax a little bit with the addition of the third app, but it doesn't need to be in this PR and I am not an expert with Ruby anyway.

For testing, I don't think we can test the full flow, but I was able to test a big chunk of it by creating a new branch release/test-update-add-wear-to-build-pipeline and adding a new lane in 58aa45e. This lane is almost the same as build_and_upload_to_play_store except that it doesn't actually upload to Play Store.

I intend to delete the new branch next week, so here is the new lane:

lane :test_wear_app_changes do | options |
  version = android_get_release_version()
  is_beta = is_beta_version(version)
  android_build_prechecks(skip_confirm: options[:skip_confirm], alpha: false, beta: is_beta, final: !is_beta) unless (options[:skip_prechecks])
  android_build_preflight() unless options[:skip_prechecks]

  release_assets = []

  APPS.each do |app|
      build_bundle(app: app, version: version)

      aab_artifact_path = aab_artifact_path(app, version)
      UI.error("Unable to find a build artifact at #{aab_artifact_path}") unless File.exist? aab_artifact_path

      track = if (app == APPS_AUTOMOTIVE)
          is_beta ? PLAY_STORE_TRACK_AUTOMOTIVE_BETA : PLAY_STORE_TRACK_AUTOMOTIVE_PRODUCTION
      elsif (app == APPS_WEAR)
          is_beta ? PLAY_STORE_TRACK_WEAR_BETA : PLAY_STORE_TRACK_WEAR_PRODUCTION
      else
          is_beta ? PLAY_STORE_TRACK_BETA : PLAY_STORE_TRACK_PRODUCTION
      end

      release_assets << aab_artifact_path
  end
end

@oguzkocer oguzkocer removed their assignment May 26, 2023
@mchowning
Copy link
Contributor Author

For testing, I don't think we can test the full flow, but I was able to test a big chunk of it by creating a new branch release/test-update-add-wear-to-build-pipeline and adding a new lane in 58aa45e. This lane is almost the same as build_and_upload_to_play_store except that it doesn't actually upload to Play Store.

Thanks! I'll keep that in mind for testing the next time I do changes to the release lanes. 🙇

@mchowning mchowning added this to the 7.40 milestone May 26, 2023
@ashiagr ashiagr merged commit c1e63e4 into main May 29, 2023
@ashiagr ashiagr deleted the update/add-wear-to-build-pipeline branch May 29, 2023 06:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

3 participants