Bug 1823462 - New application-services release system

Application services is going to switch to rapid-release / train style
model where:
  - The version numbers correspond to the Fx version (113.x for the
    current nightly cycle).
  - There are nightly builds for the current nightly release (for
    example 113.[timestamp]
  - At the end of the nightly release cycle, there's a release (for
    example 113.0)
  - There may be subsequent releases if changes are uplifted (for
    example 113.1)

- Updated the gradle code to handle the new system.  The application
  services versioning is stored in the version/channel fields of the
  `ApplicationServicesConfig` object.
- Updated the gradle code to fetch packages from the Maven
  nightly/staging repos if needed.
- Updated relbot to 6.1.0.  This is needed to handle the a-s nightly
  version bump.
- Updated creating-a-release-branch docs
This commit is contained in:
Ben Dean-Kawamura
2023-04-18 13:49:04 -04:00
committed by mergify[bot]
parent e4d6d5e065
commit fe1ad0b0e0
10 changed files with 137 additions and 25 deletions

View File

@@ -29,7 +29,7 @@ jobs:
runs-on: ubuntu-20.04 runs-on: ubuntu-20.04
steps: steps:
- name: "Update GV (On Main)" - name: "Update GV (On Main)"
uses: mozilla-mobile/relbot@6.0.0 uses: mozilla-mobile/relbot@6.1.0
if: github.repository == 'mozilla-mobile/firefox-android' if: github.repository == 'mozilla-mobile/firefox-android'
with: with:
project: android-components project: android-components
@@ -37,7 +37,7 @@ jobs:
env: env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: "Update GV (On Releases)" - name: "Update GV (On Releases)"
uses: mozilla-mobile/relbot@6.0.0 uses: mozilla-mobile/relbot@6.1.0
if: github.repository == 'mozilla-mobile/firefox-android' if: github.repository == 'mozilla-mobile/firefox-android'
with: with:
project: android-components project: android-components

View File

@@ -63,6 +63,13 @@ allprojects {
name "Mozilla" name "Mozilla"
url "https://maven.mozilla.org/maven2" url "https://maven.mozilla.org/maven2"
} }
if (ExtraRepositories.mozillaStaging) {
maven {
name "Mozilla Staging"
url "https://maven-default.stage.mozaws.net/maven2"
}
}
} }
} }

View File

@@ -7,8 +7,16 @@ buildscript {
maven { maven {
url "https://maven.mozilla.org/maven2" url "https://maven.mozilla.org/maven2"
} }
if (ExtraRepositories.mozillaStaging) {
maven {
name "Mozilla Staging"
url "https://maven-default.stage.mozaws.net/maven2"
}
}
dependencies { dependencies {
classpath "org.mozilla.appservices:tooling-nimbus-gradle:${Versions.mozilla_appservices}" classpath "${ApplicationServicesConfig.groupId}:tooling-nimbus-gradle:${ApplicationServicesConfig.version}"
classpath "org.mozilla.telemetry:glean-gradle-plugin:${Versions.mozilla_glean}" classpath "org.mozilla.telemetry:glean-gradle-plugin:${Versions.mozilla_glean}"
} }
} }

View File

@@ -26,7 +26,7 @@ android {
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
def appServicesVersion = Versions.mozilla_appservices def appServicesVersion = ApplicationServicesConfig.version
if (gradle.hasProperty("localProperties.branchBuild.application-services.version")) { if (gradle.hasProperty("localProperties.branchBuild.application-services.version")) {
appServicesVersion = gradle["localProperties.branchBuild.application-services.version"] appServicesVersion = gradle["localProperties.branchBuild.application-services.version"]
} }

View File

@@ -0,0 +1,35 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
// These lines are generated by android-components/automation/application-services-nightly-bump.py
val VERSION = "114.20230424180135"
val CHANNEL = ApplicationServicesChannel.NIGHTLY
object ApplicationServicesConfig {
val version = VERSION
val channel = CHANNEL
val groupId = when (channel) {
ApplicationServicesChannel.RELEASE -> "org.mozilla.appservices"
ApplicationServicesChannel.STAGING -> "org.mozilla.appservices"
// Nightly channels use a different group id to keep the the packages separate
ApplicationServicesChannel.NIGHTLY -> "org.mozilla.appservices.nightly"
ApplicationServicesChannel.NIGHTLY_STAGING -> "org.mozilla.appservices.nightly"
}
}
/**
* Enum for GeckoView release channels.
*
* This determines which Maven Repository. Each channel is uploaded to a separate Maven repository.
*/
enum class ApplicationServicesChannel {
// Used for official, non-nightly, releases
RELEASE,
// Used for nightly releases
NIGHTLY,
// Used for preview releases for PRs
STAGING,
// Used for nightly releases
NIGHTLY_STAGING,
}

View File

@@ -42,8 +42,6 @@ object Versions {
const val disklrucache = "2.0.2" const val disklrucache = "2.0.2"
const val leakcanary = "2.10" const val leakcanary = "2.10"
const val mozilla_appservices = "97.5.1"
// DO NOT MODIFY MANUALLY. This is auto-updated along with GeckoView. // DO NOT MODIFY MANUALLY. This is auto-updated along with GeckoView.
const val mozilla_glean = "52.6.0" const val mozilla_glean = "52.6.0"
@@ -178,22 +176,22 @@ object ComponentsDependencies {
const val tools_detekt_test = "io.gitlab.arturbosch.detekt:detekt-test:${Versions.detekt}" const val tools_detekt_test = "io.gitlab.arturbosch.detekt:detekt-test:${Versions.detekt}"
val mozilla_geckoview = "org.mozilla.geckoview:${Gecko.channel.artifactName}:${Gecko.version}" val mozilla_geckoview = "org.mozilla.geckoview:${Gecko.channel.artifactName}:${Gecko.version}"
const val mozilla_fxa = "org.mozilla.appservices:fxaclient:${Versions.mozilla_appservices}" val mozilla_fxa = "${ApplicationServicesConfig.groupId}:fxaclient:${ApplicationServicesConfig.version}"
const val mozilla_nimbus = "org.mozilla.appservices:nimbus:${Versions.mozilla_appservices}" val mozilla_nimbus = "${ApplicationServicesConfig.groupId}:nimbus:${ApplicationServicesConfig.version}"
const val mozilla_glean_forUnitTests = "org.mozilla.telemetry:glean-native-forUnitTests:${Versions.mozilla_glean}" const val mozilla_glean_forUnitTests = "org.mozilla.telemetry:glean-native-forUnitTests:${Versions.mozilla_glean}"
const val mozilla_sync_autofill = "org.mozilla.appservices:autofill:${Versions.mozilla_appservices}" val mozilla_sync_autofill = "${ApplicationServicesConfig.groupId}:autofill:${ApplicationServicesConfig.version}"
const val mozilla_sync_logins = "org.mozilla.appservices:logins:${Versions.mozilla_appservices}" val mozilla_sync_logins = "${ApplicationServicesConfig.groupId}:logins:${ApplicationServicesConfig.version}"
const val mozilla_places = "org.mozilla.appservices:places:${Versions.mozilla_appservices}" val mozilla_places = "${ApplicationServicesConfig.groupId}:places:${ApplicationServicesConfig.version}"
const val mozilla_sync_manager = "org.mozilla.appservices:syncmanager:${Versions.mozilla_appservices}" val mozilla_sync_manager = "${ApplicationServicesConfig.groupId}:syncmanager:${ApplicationServicesConfig.version}"
const val mozilla_push = "org.mozilla.appservices:push:${Versions.mozilla_appservices}" val mozilla_push = "${ApplicationServicesConfig.groupId}:push:${ApplicationServicesConfig.version}"
const val mozilla_remote_tabs = "org.mozilla.appservices:tabs:${Versions.mozilla_appservices}" val mozilla_remote_tabs = "${ApplicationServicesConfig.groupId}:tabs:${ApplicationServicesConfig.version}"
const val mozilla_httpconfig = "org.mozilla.appservices:httpconfig:${Versions.mozilla_appservices}" val mozilla_httpconfig = "${ApplicationServicesConfig.groupId}:httpconfig:${ApplicationServicesConfig.version}"
const val mozilla_full_megazord = "org.mozilla.appservices:full-megazord:${Versions.mozilla_appservices}" val mozilla_full_megazord = "${ApplicationServicesConfig.groupId}:full-megazord:${ApplicationServicesConfig.version}"
const val mozilla_full_megazord_forUnitTests = "org.mozilla.appservices:full-megazord-forUnitTests:${Versions.mozilla_appservices}" val mozilla_full_megazord_forUnitTests = "${ApplicationServicesConfig.groupId}:full-megazord-forUnitTests:${ApplicationServicesConfig.version}"
const val mozilla_errorsupport = "org.mozilla.appservices:errorsupport:${Versions.mozilla_appservices}" val mozilla_errorsupport = "${ApplicationServicesConfig.groupId}:errorsupport:${ApplicationServicesConfig.version}"
const val mozilla_rustlog = "org.mozilla.appservices:rustlog:${Versions.mozilla_appservices}" val mozilla_rustlog = "${ApplicationServicesConfig.groupId}:rustlog:${ApplicationServicesConfig.version}"
const val mozilla_sync15 = "org.mozilla.appservices:sync15:${Versions.mozilla_appservices}" val mozilla_sync15 = "${ApplicationServicesConfig.groupId}:sync15:${ApplicationServicesConfig.version}"
const val thirdparty_okhttp = "com.squareup.okhttp3:okhttp:${Versions.okhttp}" const val thirdparty_okhttp = "com.squareup.okhttp3:okhttp:${Versions.okhttp}"
const val thirdparty_okhttp_urlconnection = "com.squareup.okhttp3:okhttp-urlconnection:${Versions.okhttp}" const val thirdparty_okhttp_urlconnection = "com.squareup.okhttp3:okhttp-urlconnection:${Versions.okhttp}"

View File

@@ -0,0 +1,11 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
// Extra Maven repositories to use
object ExtraRepositories {
val mozillaStaging = (ApplicationServicesConfig.channel == ApplicationServicesChannel.STAGING
|| ApplicationServicesConfig.channel == ApplicationServicesChannel.NIGHTLY_STAGING)
}

View File

@@ -55,7 +55,26 @@ These are instructions for preparing a release branch for Firefox Android and st
``` ```
7. Create a commit named `Switch to GeckoView Beta` for this change. This change can either be directly committed to the `releases_v[beta_version]` branch or a pull request can be created against it and then merged. Once landed, it is expected that this change will temporarily break builds on the branch. The next step will fix them. 7. Create a commit named `Switch to GeckoView Beta` for this change. This change can either be directly committed to the `releases_v[beta_version]` branch or a pull request can be created against it and then merged. Once landed, it is expected that this change will temporarily break builds on the branch. The next step will fix them.
8. The Github Action will automatically bump the GeckoView version once the new Beta build is created and uploaded to Maven, as shown in [#324](https://github.com/mozilla-mobile/firefox-android/pull/324) for example. 8. The Github Action will automatically bump the GeckoView version once the new Beta build is created and uploaded to Maven, as shown in [#324](https://github.com/mozilla-mobile/firefox-android/pull/324) for example.
9. Once both of the above commits have landed, create a new `Firefox Android (Android-Components, Femix, Focus)` release in [Ship-It](https://shipit.mozilla-releng.net/) and continue with the release checklist per normal practice. 9. In [ApplicationServices.kt](https://github.com/mozilla-mobile/firefox-android/blob/main/android-components/plugins/dependencies/src/main/java/ApplicationServices.kt):
- Set `CHANNEL` to `ApplicationServicesChannel.RELEASE`
- Set `VERSION` to `[major-version].0`
```diff
diff --git a/android-components/plugins/dependencies/src/main/java/ApplicationServices.kt b/android-components/plugins/dependencies/src/main/java/ApplicationServices.kt
index f64b26d7a1..72574ab057 100644
--- a/android-components/plugins/dependencies/src/main/java/ApplicationServices.kt
+++ b/android-components/plugins/dependencies/src/main/java/ApplicationServices.kt
@@ -3,8 +3,8 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-// These lines are generated by android-components/automation/application-services-nightly-bump.py
-val VERSION = "114.20230420185101"
-val CHANNEL = ApplicationServicesChannel.NIGHTLY
+val VERSION = "114.0"
+val CHANNEL = ApplicationServicesChannel.RELEASE
```
10. Create a commit named `Swift to Application Services Release`. (Note: application-services releases directly after the nightly cycle, there's no beta cycle).
11. Once all three of the above commits have landed, create a new `Firefox Android (Android-Components, Fenix, Focus)` release in [Ship-It](https://shipit.mozilla-releng.net/) and continue with the release checklist per normal practice.
## [Dev team] Starting the next Nightly development cycle ## [Dev team] Starting the next Nightly development cycle

View File

@@ -23,6 +23,17 @@ buildscript {
} }
} }
if (ExtraRepositories.mozillaStaging) {
maven {
name "Mozilla Staging"
url "https://maven-default.stage.mozaws.net/maven2"
content {
// Improve performance: only check moz maven for mozilla deps.
includeGroupByRegex RepoMatching.mozilla
}
}
}
if (project.hasProperty("googleRepo")) { if (project.hasProperty("googleRepo")) {
maven { maven {
name "Google" name "Google"
@@ -59,15 +70,13 @@ buildscript {
} }
dependencies { dependencies {
classpath "org.mozilla.appservices:tooling-nimbus-gradle:${Versions.mozilla_appservices}"
classpath FenixDependencies.tools_androidgradle classpath FenixDependencies.tools_androidgradle
classpath FenixDependencies.tools_kotlingradle classpath FenixDependencies.tools_kotlingradle
classpath FenixDependencies.tools_benchmarkgradle classpath FenixDependencies.tools_benchmarkgradle
classpath FenixDependencies.androidx_safeargs classpath FenixDependencies.androidx_safeargs
classpath FenixDependencies.osslicenses_plugin classpath FenixDependencies.osslicenses_plugin
classpath "org.mozilla.telemetry:glean-gradle-plugin:${Versions.mozilla_glean}" classpath "org.mozilla.telemetry:glean-gradle-plugin:${Versions.mozilla_glean}"
classpath "org.mozilla.appservices:tooling-nimbus-gradle:${Versions.mozilla_appservices}" classpath "${ApplicationServicesConfig.groupId}:tooling-nimbus-gradle:${ApplicationServicesConfig.version}"
// NOTE: Do not place your application dependencies here; they belong // NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files // in the individual module build.gradle files
@@ -99,6 +108,17 @@ allprojects {
} }
} }
if (ExtraRepositories.mozillaStaging) {
maven {
name "Mozilla Staging"
url "https://maven-default.stage.mozaws.net/maven2"
content {
// Improve performance: only check moz maven for mozilla deps.
includeGroupByRegex RepoMatching.mozilla
}
}
}
if (project.hasProperty("googleRepo")) { if (project.hasProperty("googleRepo")) {
maven { maven {
name "Google" name "Google"

View File

@@ -13,6 +13,13 @@ buildscript {
maven { maven {
url "https://nightly.maven.mozilla.org/maven2" url "https://nightly.maven.mozilla.org/maven2"
} }
if (ExtraRepositories.mozillaStaging) {
maven {
name "Mozilla Staging"
url "https://maven-default.stage.mozaws.net/maven2"
}
}
} }
dependencies { dependencies {
@@ -20,7 +27,7 @@ buildscript {
classpath FocusDependencies.kotlin_gradle_plugin classpath FocusDependencies.kotlin_gradle_plugin
classpath FocusDependencies.osslicenses_plugin classpath FocusDependencies.osslicenses_plugin
classpath "org.mozilla.telemetry:glean-gradle-plugin:${Versions.mozilla_glean}" classpath "org.mozilla.telemetry:glean-gradle-plugin:${Versions.mozilla_glean}"
classpath "org.mozilla.appservices:tooling-nimbus-gradle:${Versions.mozilla_appservices}" classpath "${ApplicationServicesConfig.groupId}:tooling-nimbus-gradle:${ApplicationServicesConfig.version}"
// NOTE: Do not place your application dependencies here; they belong // NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files // in the individual module build.gradle files
@@ -55,6 +62,13 @@ allprojects {
maven { maven {
url "https://maven.mozilla.org/maven2" url "https://maven.mozilla.org/maven2"
} }
if (ExtraRepositories.mozillaStaging) {
maven {
name "Mozilla Staging"
url "https://maven-default.stage.mozaws.net/maven2"
}
}
} }
} }