A NodeJS application to automate binary deployments from Unity Cloud Build to App Center.
- Receive a webhook from Unity Cloud Build to notify a build is ready.
- Get the build details from the JSON payload within the webhook.
- Download the app binary from the Unity Cloud Build API.
- Upload the app binary to App Center.
- Setup a Unity Cloud Build account and project.
- Setup a App Center account.
UNITYCLOUD_KEY
- Unity Cloud Build API keyUNITYCLOUD_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
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 applicationappName
- name of the App Center applicationteam
- name of the team to distribute the app to on App CenterexcludeTargets
- comma-separated list of Unity Cloud Build targets that shouldn't be deployed to App CenterincludeTargets
- comma-separated list of Unity Cloud Build targets that should be deployed to App Center (targets not on this list will be excluded)
- Pull the Docker image.
- Create API keys for both Unity Cloud Build and App Center.
- Deploy the Docker image.
- Setup the Unity Cloud Build webhook.
- Within UCB, view your app. Click 'Notifications', then 'Add New' and enter your app URL with '/build' appended. E.g. 'https://[appurl]/build/'
Use a tool like ngrok to test web hooks from Unity Cloud Build and verify their payload.
- 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.
- Integrate job system to manage/prioritise jobs and view jobs in progress.
Copyright 2016 Nathan Brodbent
This software is licensed under Apache License 2.0.