Giter Site home page Giter Site logo

d68fbe50 / android-cloud-build Goto Github PK

View Code? Open in Web Editor NEW

This project forked from pixiteapps/android-cloud-build

0.0 1.0 0.0 55 KB

Utilities to build Android apps using Google Cloud Build https://cloud.google.com/cloud-build/

License: Apache License 2.0

Dockerfile 3.44% JavaScript 40.56% Shell 56.00%

android-cloud-build's Introduction

Google Cloud Build Android Builders

This repository contains utilities to build Android apps using Google Cloud Build.

Usage

Google Cloud Build executes a build as a series of build steps. Each build step is run in a Docker container. See the Cloud Build documentation for more details about builds and build steps.

Before you begin

  1. Select or create a Google Cloud project.
  2. Enable billing for your project.
  3. Enable the Cloud Build API.
  4. Install and initialize the Cloud SDK.

Build the build step from source

To use the builders in this repository you ned to download the source code and build the images. All of the included builders have cloudbuild.yaml files so they can easily be built on Google Cloud Build and deployed to your project's Google Cloud Registry for use in your builds.

The example below shows how to download and build the image for the save_cache build step on a Linux or Mac OS X workstation:

  1. Clone the android-cloud-build repo:

    git clone https://github.com/pixiteapps/android-cloud-build
  2. Go to the directory that has the source code for the save_cache Docker image:

    cd android-cloud-build/save_cache
  3. Build the Docker image:

    gcloud builds submit --config cloudbuild.yaml .
    
  4. View the image in Google Container Registry:

    gcloud container images list --filter save_cache

Use the build step with Cloud Build build

Once you've built the Docker image, you can use it as a build step in a Cloud Build build.

For example, below is the save_cache build step in a YAML config file, ready to be used in a Cloud Build build:

- name: 'gcr.io/$PROJECT_ID/save_cache'
  args:
  - --bucket=$_CACHE_BUCKET
  - --key=build-cache-$( checksum build.gradle )
  - --path=.gradle/wrapper
  - --path=.gradle/cache

Building All Builders

If you'd like to use all of the build steps in this repository, you can run the cloudbuild.yaml build from the root directory to build and deploy all builders.

gcloud builds submit .

License

Copyright 2018 Pixite Inc.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

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.