This is a collection of tools to help you setup your android app project for continuous build by google cloud build
Open up google shell and clone this
git clone https://github.com/Alwin-Lin/GCP-automation.git
cd GCP-automation
If this the first time, Create a new GCP project and grant acces to cloud storage.
After that, if this is first time, run setup.sh>cloneAndBuild.sh>triggerCreation.sh
bash setup.sh
The script will clone Android testing sample code as a example
You can set APP_GITHUB_URL to your GitHub project URL to clone your project.
bash cloneAndBuild.sh
For example if your project is GPU Emulation Stress Test
export APP_GITHUB_URL="https://github.com/google/gpu-emulation-stress-test"
bash cloneAndBuild.sh
Follow the instructions here
This links Android testing sample code to your GCP.
You can set APP_GITHUB_URL to your GitHub project URL to link your prposetory
After that is done:
bash triggerCreation.sh
Here is a blog that goes through the complete process from creating a project to setting up a trigger.
These scripts are designed for google shell
Creates android SDK and tar image, as well as create google cloud storage. This takes care of step 3 and 4 in the example
The defalt SDK image type is SDK, Android version is 28
Defalt bucket is called gcb_bucket_apk for apk and gcb_bucket_cache for cache
Change as you see fit
Clones your Github Project and adds cloudbuild config to the file, then validates by running a local build. This does steps 5~7
This requires you to input the project that you want to clone
Links Google cloud build to GitHub so that it auto builds whenever there is a new commit. This takes care of step 8
Again, link your github to google cloud platform or else this will not work
Contains google cloud build config, this will be coppied to the project folder