Unity cloud build delete project
- #Unity cloud build delete project how to#
- #Unity cloud build delete project update#
- #Unity cloud build delete project code#
- #Unity cloud build delete project download#
The complete source code for the project is available on GitHub. This was a brief description about how we connected Bitbucket and Unity Cloud Build to automatically create builds for each pull request so we can test it before merging it to the master branch. However, it is not a big concern for us because the branch will be eventually built again for the latest commit. There is some potential for race conditions since we can push other commits when the build is running, and then the status would be set for an incorrect commit.
#Unity cloud build delete project update#
And when the Cloud Build webhook is called with the updated build status, we already have new commit saved in the database and can update the status for the latest commit. We don’t need to update anything about the build target, because it has the auto-build option on, so it will build anytime the branch is updated.
We can then save the latest commit when handling that event. There is a webhook event from Bitbucket for updating the pull request. Since we set the build status in Bitbucket for the commit, not branch or pull request, we need to keep track of what the latest commit in the branch is. The communication is shown in the following sequence diagram: delete the build target in Cloud when the pull request in Bitbucket is merged or closed.update build status in Bitbucket whenever a build status in Cloud Build is changed.create a new build target in Cloud Build whenever a new pull request is created in Bitbucket.We needed an intermediate service for the communication between Bitbucket and Cloud Build. Luckily, Cloud Build has an API, and also Bitbucket has an API that can be used for that. We needed to automate creating a new target in the Cloud Build whenever somebody opens a new pull request in Bitbucket. Another tedious task which can be easily skipped due to laziness. For the feature branches, we would have to set up a new target in the Cloud Build manually. That didn’t help with preventing it from breaking. The thing is, the build was available after the feature branch was merged to the master branch. Cloud Build can be set up from the specific branch, and every time it is changed, a new build is created, which is nice to get the latest build from the master branch. The whole workflow we are using is shown in the following activity diagram. That is a huge step forward to automate most of the tedious tasks. It can even run tests and fail the build if the tests fail.
#Unity cloud build delete project download#
After the build is finished, it can send a link to email or Slack where you can simply download it to the device directly. You can connect your source control management tool to the Cloud Build and automatically get the project built when there are new changes pushed to the given branch.
Sometimes we found out that the tests (thus maybe something in the game) were broken after we merged several other branches. Once we started using automated tests, it got even worse, because it was so easy to forget to run them before committing the changes.
#Unity cloud build delete project how to#
Our graphic designer didn’t even know how to build the game for the device, so he had to meet a developer physically to get the latest build. The other problem was to even distribute the latest build from the master branch among the team. What we end up with was something like: “Did you test it on the device?” - “Yes, it worked.” - “Ok, let’s merge it.” And from time to time, master branch got broken. That’s a lot of work doing this for every pull request. The problem with iOS games is that they are not as simple to distribute because you need to set up the certificates for the devices or build it directly from Xcode while having the device connected to the computer. Therefore, we needed to test the build before the feature branch was merged to the master branch. We wanted to have a working, playable build available all the time. When they finishes the work, they create a pull request, and once it is accepted in the review by other developers, it is merged to the master branch. The typical workflow is that developers create a new branch from the master branch for a feature or a bug fix. We are using Git, specifically Bitbucket, as a source control management tool. This article explains how we utilised Unity Cloud Build to automate testing and distributing builds among the team while working on new features.
Since we are not doing this as our full-time job, we are trying to automate as much as possible during the development. We are working in a team of five people on an iOS game.