Coder Social home page Coder Social logo

gcp-automation's Introduction

GCB-automation

This is a collection of tools to help you setup your android app project for continuous build by google cloud build

Installing

Open up google shell and clone this

git clone https://github.com/Alwin-Lin/GCP-automation.git
cd GCP-automation

Getting started

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

1. Create android SDK and tar container images

bash setup.sh

2. Clone your Android app GitHub project and testing setup by triggereing local build

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

3. Linking GCP to GitHub for auto build on commit

3.1 Link GCB to your GitHub project

Follow the instructions here

3.2 Creates a trigger conecting google cloud and github

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

Examples

Here is a blog that goes through the complete process from creating a project to setting up a trigger.

What each files do

These scripts are designed for google shell

setup.sh

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

cloneAndBuild.sh

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

triggerCreation.sh

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

Template

Contains google cloud build config, this will be coppied to the project folder

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.