Skip to content

Nightly build published on Firebase #6478

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

Merged
merged 13 commits into from
Jul 18, 2022
Merged

Nightly build published on Firebase #6478

merged 13 commits into from
Jul 18, 2022

Conversation

bmarty
Copy link
Member

@bmarty bmarty commented Jul 5, 2022

See details in #5803

See the file nightly.md from this PR to get more details.

The only not tested thing is the GitHub workflow. Can be tested only once merged ://

Closes #5803

@bmarty bmarty force-pushed the feature/bma/nightly branch from 6595bd5 to 3ae695a Compare July 6, 2022 08:09
@bmarty bmarty changed the title Nightly build publish on Firebase Nightly build published on Firebase Jul 6, 2022
@bmarty bmarty force-pushed the feature/bma/nightly branch from 3ae695a to 253480f Compare July 6, 2022 13:39
…ather do some copy paste, to avoid a warning about values being replaced
@bmarty bmarty force-pushed the feature/bma/nightly branch from 35b03ec to 95f4d88 Compare July 12, 2022 10:09
@bmarty bmarty requested review from ouchadam and ganfra July 12, 2022 10:13
@bmarty bmarty marked this pull request as ready for review July 12, 2022 10:13
@@ -1,6 +1,7 @@
import com.android.build.OutputFile

apply plugin: 'com.android.application'
apply plugin: 'com.google.firebase.appdistribution'
Copy link
Member Author

Choose a reason for hiding this comment

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

I hope this will not be a problem for F-Droid build, but since we already have non free com.google.android.gms.oss-licenses-plugin just below, I think this will be OK.

Copy link
Contributor

Choose a reason for hiding this comment

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

if we find out it is a problem we can use a similar mechanism to the coverage task and conditionally apply the plugin

- name: Prepare changelog file
run: |
mv towncrier.toml towncrier.toml.bak
sed 's/CHANGES\.md/CHANGES_NIGHTLY\.md/' towncrier.toml.bak > towncrier.toml
Copy link
Contributor

Choose a reason for hiding this comment

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

should we commit the changes file after successfully deploying the nightly?

Copy link
Member Author

Choose a reason for hiding this comment

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

I do not think this is necessary, this is just a temporary file which will contain the changelog sent to firebase.

@@ -5,6 +5,6 @@
android:viewportHeight="108">
<path
android:pathData="m0,0h108v108h-108z"
android:fillColor="#0DBD8B"
android:fillColor="@color/launcher_background"
Copy link
Contributor

Choose a reason for hiding this comment

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

💯

@@ -268,6 +278,40 @@ android {
}
// signingConfig signingConfigs.release
}

nightly {
applicationIdSuffix ".nightly"
Copy link
Contributor

Choose a reason for hiding this comment

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

we'll also need to update the sygnal config to include the new package/sha

Copy link
Member Author

Choose a reason for hiding this comment

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

Are you sure about that? (I will double check that I can receive Push with the nightly)

Copy link
Member

Choose a reason for hiding this comment

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

For me it should be working as it's a suffix

Copy link
Contributor

Choose a reason for hiding this comment

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

ah you're right! it's working locally for me, I thought we'd need to introduce the package into https://github.com/matrix-org/sygnal/blob/main/sygnal.yaml.sample#L203

I guess we're okay because the GCM api key is the same for nightly and debug (I thought firebase would validate package names, shas and api keys 🤔 )

yes n | towncrier --version nightly
- name: Build and upload Gplay Nightly APK
run: |
./gradlew assembleGplayNightly appDistributionUploadGplayNightly $CI_GRADLE_ARG_PROPERTIES --stacktrace
Copy link
Contributor

Choose a reason for hiding this comment

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

in the future we may want to also run the tests beforehand to ensure we don't release a potentially broken build~

@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

0.0% 0.0% Coverage
0.0% 0.0% Duplication


*Note:* Due to a limitation of Firebase, the nightly build is the universal build, which means that the size of the APK is a bit bigger, but this should not have any other side effect.

## How to register to get nightly build
Copy link
Contributor

@ouchadam ouchadam Jul 12, 2022

Choose a reason for hiding this comment

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


## How to register to get nightly build

Provide your email to the Android team, who will add it to the list "External testers" on Firebase. You will then receive an invite on the provided email.
Copy link
Contributor

Choose a reason for hiding this comment

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

should we mention the user will need to have a google account to access the nightly build via firebase?

Copy link
Member Author

Choose a reason for hiding this comment

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

Are you sure about that? There are other email type in the group external-testers

Copy link
Contributor

Choose a reason for hiding this comment

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

that's my understanding, it sounds like you're meant to associate external emails to a google account

Step 1: Sign in with Google to accept the invitation

After opening an invitation to test an app, you can sign in with any Google account to accept the invitation, not just the account to which the invitation was originally sent.

A Google account can be associated with any email address, not only addresses with Gmail or G Suite domains. Find out how to sign in with another email address.

https://firebase.google.com/docs/app-distribution/get-set-up-as-a-tester?platform=android

Copy link
Member

@ganfra ganfra left a comment

Choose a reason for hiding this comment

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

Ok for me if pushs are working

@bmarty bmarty merged commit 4ed24b5 into develop Jul 18, 2022
@bmarty bmarty deleted the feature/bma/nightly branch July 18, 2022 12:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Set up Nightly builds
3 participants