Skip to content

Conversation

@anonymous-akorn
Copy link
Contributor

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.

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.
Copy link
Contributor

@vimanyu vimanyu left a 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.

@paulb777
Copy link
Member

@DellaBitta
Copy link
Contributor

DellaBitta commented Oct 20, 2020

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.
@anonymous-akorn
Copy link
Contributor Author

anonymous-akorn commented Oct 20, 2020

Well that's new:

NDK_ROOT environment variable is not set, or NDK version is incorrect. This build requires NDK r16b for STLPort compatibility, downloading... + curl -LSs https://dl.google.com/android/repository/android-ndk-r16b-windows-x86_64.zip --output /tmp/android-ndk-r16b.zip curl: (16) Error in the HTTP2 framing layer Error: Process completed with exit code 16. 
Copy link
Contributor

@vimanyu vimanyu left a comment

Choose a reason for hiding this comment

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

LGTM

@anonymous-akorn anonymous-akorn merged commit 1d066e2 into dev Oct 23, 2020
@anonymous-akorn anonymous-akorn deleted the feature/aks-gcs-artifacts branch October 23, 2020 17:32
@firebase firebase locked and limited conversation to collaborators Nov 23, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

4 participants