Coder Social home page Coder Social logo

unity-cloud-build-app-center's Introduction

Unity Cloud Build To App Center

A NodeJS application to automate binary deployments from Unity Cloud Build to App Center.

App Flow

  1. Receive a webhook from Unity Cloud Build to notify a build is ready.
  2. Get the build details from the JSON payload within the webhook.
  3. Download the app binary from the Unity Cloud Build API.
  4. Upload the app binary to App Center.

Requirements

Env variables

  • UNITYCLOUD_KEY - Unity Cloud Build API key
  • UNITYCLOUD_SECRET - shared secret used by Unity Cloud Build to sign the request when sending webhook. This signature need to be valid, otherwise the request will be ignored If this variable is not provided, signature check will be disabled (ie. all requests will be accepted).
  • APPCENTER_KEY - App Center API key (the your user API Key)

URL configuration

When setting up the webhook in Unity Cloud Build, you can provide all the required configuration in the URL query string.

  • ownerName - name of the owner of the App Center application
  • appName - name of the App Center application
  • team - name of the team to distribute the app to on App Center
  • excludeTargets - comma-separated list of Unity Cloud Build targets that shouldn't be deployed to App Center
  • includeTargets - comma-separated list of Unity Cloud Build targets that should be deployed to App Center (targets not on this list will be excluded)

Installation

  1. Pull the Docker image.
  2. Create API keys for both Unity Cloud Build and App Center.
    • UCB API key can be obtained here.
    • App Center API key can be created here.
  3. Deploy the Docker image.
  4. Setup the Unity Cloud Build webhook.

Unity Cloud Build Webhook

  1. Within UCB, view your app.
  2. Click 'Integrations'.
  3. 'Add New' and enter your app URL with '/build' appended. E.g. 'https://[appurl]/build?ownerName=rmgomez&appName=Test-UCB-iOS&includeTargets=Dev%20iOS'
  4. Create and set a new Authorization Secret (this will be your UNITYCLOUD_SECRET env var)
  5. Set the Authorization Type as HMAC-SHA256 Signature

Troubleshooting

Use a tool like ngrok to test web hooks from Unity Cloud Build and verify their payload.

Notes

  • If you use Slack, integrate UCB and App Center to be notified when a new build is ready and has been pushed to App Center.
  • Configure App Center to automatically notify users after the binary is uploaded.

Todo

  • Integrate job system to manage/prioritise jobs and view jobs in progress.

Licenses

Copyright 2016 Nathan Brodbent

This software is licensed under Apache License 2.0.

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.