-   Notifications  
You must be signed in to change notification settings  - Fork 125
 
Upload desktop integration artifacts to GCS #168
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
Conversation
We can't expose these artifacts in Github workflows, as that would expose secrets: in order to run a desktop integration test it's necessary to have the decrypted google-services.json file. This script thus uploads desktop artifacts (the integration test binaries, and the google services json) to GCS instead. To avoid duplication with the existing test_lab.py tool, common functionality has been moved into integration_testing/gcs.py
It seems "!cancelled()" works in compound conditions, but not in isolation. Need to use the explicit {{ !cancelled() }} syntax when the status function is the only item in the condition. Python 3.9 is incompatible with the Google Cloud SDK at the moment. It supports 3.6-3.8, so we pin to 3.7 to be consistent with the version of Pytohn used by the workflows that build the Firebase SDK.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good for most part.
 Spotted a couple of places with code duplication where we could use the utility module.
|   Consider adapting this presubmit test - https://github.com/firebase/firebase-ios-sdk/blob/master/scripts/check_copyright.sh  |  
|   Yep, thanks! It's on our list of things to do!  |  
- Move relative_path_to_gs_uri to shared library gcs.py, and have it return paths unmodified if they're already gs uris. - Replace Windows path separators in test_lab.py when declaring results directory for mobile integration tests, to avoid issues when trying to download artifacts on Mac/Linux. - Use os.path.relpath instead of custom logic that does the same thing.
|   Well that's new:  |  
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
This creates a python script to upload artifacts to GCS, and adds a step to the integration test workflow to run it.
We can't expose these artifacts in Github workflows, as that would expose secrets: in order to run a desktop integration test it's necessary to have the decrypted google-services.json file. This script thus uploads desktop artifacts (the integration test binaries, and the google services json) to GCS instead.
To avoid duplication with the existing test_lab.py tool, common functionality has been moved into the new library file integration_testing/gcs.py
At the end of the workflow step to upload artifacts, it will report this:
Use 'gsutil cp <gs_uri> <local_path> to copy an artifact locally.
Use 'gsutil -m cp -r gs://games-auto-release-testing/201013-231404_ckjT <local_path> to copy everything.
This can be used to download artifacts for local testing/inspection. This requires the cloud sdk to be installed locally, to use the gsutil tool.