SlideShare a Scribd company logo
Speaker: Nebojsa Brindic
Heroes of order & chaos
Continuous integration in game development
Order
1. Idea
2. MVP feature freeze
3. R & D phase
4. Define target HW requirements
5. Predict performance optimisation (optional)
6. Develop & deploy
Chaos
1. Development w/o source control
a. Impossible code undo
b. Impossible concurrent development
c. No development history
2. Development w/o unit tests
a. Time loss due to manual testing
b. Regression bugs
3. Manual deployment
Discipline Your source code
BEATING THE CHAOS
Based on Vincent Driessen’s post.
Define Your labeling scheme
X.Y.Z
release feature hotfix
GitFlow - Main branches
GitFlow - Supporting branches
features
hotfixes
GitFlow:
Structure & discipline
GitFlow clients
For lazy developers For hard-cores
Automate!
SPEEDING UP THE ORDER
Continuous integration (CI)
Automation of the following steps:
integrate (GitFlow)
build
test
deploy
Prerequisites
Jenkins
Git Extensions
Java
Unity 3d
Every specific platform requires its own topics. For example, android builds require android SDK
to be installed on computer and set up in Unity. You MUST make sure it works before setting
up build server.
Infrastructure setup
Triggering build on commit
1. Install git-client plugin on Jenkins
● Plugin url: https://wiki.jenkins-ci.org/display/JENKINS/Git+Client+Plugin
2. Navigate to .git folder of Your repo
3. Enter HOOKS sub-folder
4. Edit post-commit hook:
● curl http://yourserver/jenkins/git/notifyCommit?url=<URL of the Git repository>
Running Unity3d build from Jenkins
1. Install Unity3dBuilder plugin in Jenkins
● Plugin url: https://wiki.jenkins-ci.org/display/JENKINS/Unity3dBuilder+Plugin
2. Add “Invoke Unity editor” build step in Jenkins with following command:
● -quit -batchmode -nographics -executeMethod BuildScripts.BuildWebPlayer -projectPath [full project path]
3. Implement method BuildScripts.BuildWebPlayer in Unity3D project
● see appendix A for sample source code
}
Based on the GranCruGames blog.
● NOTE: If You don’t want to customize Your build with own script, You can use
something like:
○ -quit -batchmode -projectPath "$WORKSPACE" -buildWindowsPlayer
"Artifacts/game.x86.exe" -logFile "$WORKSPACE/unity3d_editor.log"
Unit testing after build from Jenkins
1. Install Unity Test Tools from Asset Store
● Plugin url: https://www.assetstore.unity3d.com/en/#!/content/13802
2. Implement some unit tests in Your Unity project
3. Add “Invoke Unity editor” build step with following command:
● -batchmode -executeMethod UnityTest.Batch.RunUnitTests -quit -resultFilePath=”$WORKSPACETestsUnitresult.xml”
Based on the RamblingCoder’s channel.
Deploy after test from Jenkins
1. Install SSH Publish plugin in Jenkins
● Plugin url: https://wiki.jenkins-ci.org/display/JENKINS/Publish+Over+SSH+Plugin
2. Configure SSH Server
3. Add SSH file transfer build step
}
Report NUnit testing results
1. Install NUnit plugin in Jenkins
● Plugin url: https://wiki.jenkins-ci.org/display/JENKINS/NUnit+Plugin
2. Add “Publish NUnit test result report” post-build action:
Based on the RamblingCoder’s channel.
The end result
Summary
Why practice GitFlow?
Why use CI?
Thanks!
Appendix A
Source code for custom build script:
using UnityEditor;
using System;
class BuildScript
{
static void BuildWebPlayer ()
{
string buildTarget = System.Environment.GetEnvironmentVariable("UNITY_BUILD_TARGET");
if (buildTarget == null || buildTarget.Length == 0) {
throw new Exception("UNITY_BUILD_TARGET -system property not defined, aborting.");
}
string[] scenes = { "Assets/Level0.unity", "Assets/Level1.unity", "Assets/Level2.unity", "Assets/Level3.unity" };
string error = BuildPipeline.BuildPlayer(scenes, buildTarget, BuildTarget.WebPlayerStreamed, BuildOptions.None);
if (error != null && error.Length > 0) {
throw new Exception("Build failed: " + error);
}
}

More Related Content

What's hot

CI/CD with Jenkins and Docker - DevOps Meetup Day Thailand
CI/CD with Jenkins and Docker - DevOps Meetup Day ThailandCI/CD with Jenkins and Docker - DevOps Meetup Day Thailand
CI/CD with Jenkins and Docker - DevOps Meetup Day Thailand
Troublemaker Khunpech
 
Pimp your Continuous Delivery Pipeline with Jenkins workflow (W-JAX 14)
Pimp your Continuous Delivery Pipeline with Jenkins workflow (W-JAX 14)Pimp your Continuous Delivery Pipeline with Jenkins workflow (W-JAX 14)
Pimp your Continuous Delivery Pipeline with Jenkins workflow (W-JAX 14)
CloudBees
 
Atlassian Bamboo Feature Overview
Atlassian Bamboo Feature OverviewAtlassian Bamboo Feature Overview
Atlassian Bamboo Feature Overview
Jim Bethancourt
 
Jenkins CI presentation
Jenkins CI presentationJenkins CI presentation
Jenkins CI presentation
Jonathan Holloway
 
Javaone 2014 - Git & Docker with Jenkins
Javaone 2014 - Git & Docker with JenkinsJavaone 2014 - Git & Docker with Jenkins
Javaone 2014 - Git & Docker with Jenkins
Andy Pemberton
 
Criando pipelines de entrega contínua multilinguagem com Docker e Jenkins
Criando pipelines de entrega contínua multilinguagem com Docker e JenkinsCriando pipelines de entrega contínua multilinguagem com Docker e Jenkins
Criando pipelines de entrega contínua multilinguagem com Docker e Jenkins
Camilo Ribeiro
 
為 Node.js 專案打造專屬管家進行開發流程整合及健康檢測
為 Node.js 專案打造專屬管家進行開發流程整合及健康檢測為 Node.js 專案打造專屬管家進行開發流程整合及健康檢測
為 Node.js 專案打造專屬管家進行開發流程整合及健康檢測
謝 宗穎
 
Саша Белецкий "Continuous Delivery в продуктовой разработке"
Саша Белецкий "Continuous Delivery в продуктовой разработке"Саша Белецкий "Continuous Delivery в продуктовой разработке"
Саша Белецкий "Continuous Delivery в продуктовой разработке"
Agile Base Camp
 
An Introduction To Jenkins
An Introduction To JenkinsAn Introduction To Jenkins
An Introduction To Jenkins
Knoldus Inc.
 
Introduction to jenkins
Introduction to jenkinsIntroduction to jenkins
Introduction to jenkins
Abe Diaz
 
Setup Build & Deploy with Jenkins CI
Setup Build & Deploy with Jenkins CISetup Build & Deploy with Jenkins CI
Setup Build & Deploy with Jenkins CI
walming
 
Jenkins introduction
Jenkins introductionJenkins introduction
Jenkins introduction
Gourav Varma
 
Fastlane - Automation and Continuous Delivery for iOS Apps
Fastlane - Automation and Continuous Delivery for iOS AppsFastlane - Automation and Continuous Delivery for iOS Apps
Fastlane - Automation and Continuous Delivery for iOS Apps
Sarath C
 
CI/CD Pipeline to Deploy and Maintain an OpenStack IaaS Cloud
CI/CD Pipeline to Deploy and Maintain an OpenStack IaaS CloudCI/CD Pipeline to Deploy and Maintain an OpenStack IaaS Cloud
CI/CD Pipeline to Deploy and Maintain an OpenStack IaaS Cloud
Simon McCartney
 
vodQA(Pune) 2018 - Visual testing of web apps in headless environment manis...
vodQA(Pune) 2018 - Visual testing of web apps in headless environment   manis...vodQA(Pune) 2018 - Visual testing of web apps in headless environment   manis...
vodQA(Pune) 2018 - Visual testing of web apps in headless environment manis...
vodQA
 
JUC Europe 2015: Plugin Development with Gradle and Groovy
JUC Europe 2015: Plugin Development with Gradle and GroovyJUC Europe 2015: Plugin Development with Gradle and Groovy
JUC Europe 2015: Plugin Development with Gradle and Groovy
CloudBees
 
Continuous Integration (Jenkins/Hudson)
Continuous Integration (Jenkins/Hudson)Continuous Integration (Jenkins/Hudson)
Continuous Integration (Jenkins/Hudson)
Dennys Hsieh
 
Continuous Delivery Using Jenkins
Continuous Delivery Using JenkinsContinuous Delivery Using Jenkins
Continuous Delivery Using Jenkins
Cliffano Subagio
 
Rise of the Machines - Automate your Development
Rise of the Machines - Automate your DevelopmentRise of the Machines - Automate your Development
Rise of the Machines - Automate your Development
Sven Peters
 
Production ready word press
Production ready word pressProduction ready word press
Production ready word press
Edmund Turbin
 

What's hot (20)

CI/CD with Jenkins and Docker - DevOps Meetup Day Thailand
CI/CD with Jenkins and Docker - DevOps Meetup Day ThailandCI/CD with Jenkins and Docker - DevOps Meetup Day Thailand
CI/CD with Jenkins and Docker - DevOps Meetup Day Thailand
 
Pimp your Continuous Delivery Pipeline with Jenkins workflow (W-JAX 14)
Pimp your Continuous Delivery Pipeline with Jenkins workflow (W-JAX 14)Pimp your Continuous Delivery Pipeline with Jenkins workflow (W-JAX 14)
Pimp your Continuous Delivery Pipeline with Jenkins workflow (W-JAX 14)
 
Atlassian Bamboo Feature Overview
Atlassian Bamboo Feature OverviewAtlassian Bamboo Feature Overview
Atlassian Bamboo Feature Overview
 
Jenkins CI presentation
Jenkins CI presentationJenkins CI presentation
Jenkins CI presentation
 
Javaone 2014 - Git & Docker with Jenkins
Javaone 2014 - Git & Docker with JenkinsJavaone 2014 - Git & Docker with Jenkins
Javaone 2014 - Git & Docker with Jenkins
 
Criando pipelines de entrega contínua multilinguagem com Docker e Jenkins
Criando pipelines de entrega contínua multilinguagem com Docker e JenkinsCriando pipelines de entrega contínua multilinguagem com Docker e Jenkins
Criando pipelines de entrega contínua multilinguagem com Docker e Jenkins
 
為 Node.js 專案打造專屬管家進行開發流程整合及健康檢測
為 Node.js 專案打造專屬管家進行開發流程整合及健康檢測為 Node.js 專案打造專屬管家進行開發流程整合及健康檢測
為 Node.js 專案打造專屬管家進行開發流程整合及健康檢測
 
Саша Белецкий "Continuous Delivery в продуктовой разработке"
Саша Белецкий "Continuous Delivery в продуктовой разработке"Саша Белецкий "Continuous Delivery в продуктовой разработке"
Саша Белецкий "Continuous Delivery в продуктовой разработке"
 
An Introduction To Jenkins
An Introduction To JenkinsAn Introduction To Jenkins
An Introduction To Jenkins
 
Introduction to jenkins
Introduction to jenkinsIntroduction to jenkins
Introduction to jenkins
 
Setup Build & Deploy with Jenkins CI
Setup Build & Deploy with Jenkins CISetup Build & Deploy with Jenkins CI
Setup Build & Deploy with Jenkins CI
 
Jenkins introduction
Jenkins introductionJenkins introduction
Jenkins introduction
 
Fastlane - Automation and Continuous Delivery for iOS Apps
Fastlane - Automation and Continuous Delivery for iOS AppsFastlane - Automation and Continuous Delivery for iOS Apps
Fastlane - Automation and Continuous Delivery for iOS Apps
 
CI/CD Pipeline to Deploy and Maintain an OpenStack IaaS Cloud
CI/CD Pipeline to Deploy and Maintain an OpenStack IaaS CloudCI/CD Pipeline to Deploy and Maintain an OpenStack IaaS Cloud
CI/CD Pipeline to Deploy and Maintain an OpenStack IaaS Cloud
 
vodQA(Pune) 2018 - Visual testing of web apps in headless environment manis...
vodQA(Pune) 2018 - Visual testing of web apps in headless environment   manis...vodQA(Pune) 2018 - Visual testing of web apps in headless environment   manis...
vodQA(Pune) 2018 - Visual testing of web apps in headless environment manis...
 
JUC Europe 2015: Plugin Development with Gradle and Groovy
JUC Europe 2015: Plugin Development with Gradle and GroovyJUC Europe 2015: Plugin Development with Gradle and Groovy
JUC Europe 2015: Plugin Development with Gradle and Groovy
 
Continuous Integration (Jenkins/Hudson)
Continuous Integration (Jenkins/Hudson)Continuous Integration (Jenkins/Hudson)
Continuous Integration (Jenkins/Hudson)
 
Continuous Delivery Using Jenkins
Continuous Delivery Using JenkinsContinuous Delivery Using Jenkins
Continuous Delivery Using Jenkins
 
Rise of the Machines - Automate your Development
Rise of the Machines - Automate your DevelopmentRise of the Machines - Automate your Development
Rise of the Machines - Automate your Development
 
Production ready word press
Production ready word pressProduction ready word press
Production ready word press
 

Similar to Continuous integration in games development

HoloLens Unity Build Pipelines on Azure DevOps
HoloLens Unity Build Pipelines on Azure DevOpsHoloLens Unity Build Pipelines on Azure DevOps
HoloLens Unity Build Pipelines on Azure DevOps
Sarah Sexton
 
Working with the AOSP - Linaro Connect Asia 2013
Working with the AOSP - Linaro Connect Asia 2013Working with the AOSP - Linaro Connect Asia 2013
Working with the AOSP - Linaro Connect Asia 2013
Opersys inc.
 
Intro to JavaScript Tooling in Visual Studio Code
Intro to JavaScript Tooling in Visual Studio CodeIntro to JavaScript Tooling in Visual Studio Code
Intro to JavaScript Tooling in Visual Studio Code
ColdFusionConference
 
Automated Build using teamcity
Automated Build using teamcityAutomated Build using teamcity
Automated Build using teamcity
Md Jawed
 
Android build on windows
Android build on windowsAndroid build on windows
Android build on windows
Addweup
 
How do we test nodejs apps?
How do we test nodejs apps?How do we test nodejs apps?
How do we test nodejs apps?
Michal Juhas
 
Webinar - Unbox GitLab CI/CD
Webinar - Unbox GitLab CI/CD Webinar - Unbox GitLab CI/CD
Webinar - Unbox GitLab CI/CD
Annie Huang
 
[Gstar 2013] Unity Security
[Gstar 2013] Unity Security[Gstar 2013] Unity Security
[Gstar 2013] Unity Security
Seungmin Shin
 
Android Platform Debugging and Development
Android Platform Debugging and DevelopmentAndroid Platform Debugging and Development
Android Platform Debugging and Development
Opersys inc.
 
Developing NuGet
Developing NuGetDeveloping NuGet
Developing NuGet
Jeff Handley
 
Android Platform Debugging and Development
Android Platform Debugging and DevelopmentAndroid Platform Debugging and Development
Android Platform Debugging and Development
Opersys inc.
 
GeoServer Developers Workshop
GeoServer Developers WorkshopGeoServer Developers Workshop
GeoServer Developers Workshop
Jody Garnett
 
Android Platform Debugging and Development
Android Platform Debugging and DevelopmentAndroid Platform Debugging and Development
Android Platform Debugging and Development
Opersys inc.
 
The Android Build System - Android Marshmallow
The Android Build System - Android MarshmallowThe Android Build System - Android Marshmallow
The Android Build System - Android Marshmallow
Ron Munitz
 
Modern Development Tools
Modern Development ToolsModern Development Tools
Modern Development Tools
Ye Maw
 
Lezione 02 React and React Native installation and Configuration
Lezione 02   React and  React Native installation and ConfigurationLezione 02   React and  React Native installation and Configuration
Lezione 02 React and React Native installation and Configuration
University of Catania
 
Android Platform Debugging and Development
Android Platform Debugging and DevelopmentAndroid Platform Debugging and Development
Android Platform Debugging and Development
Opersys inc.
 
Azure Integration DTAP Series, How to go from Development to Production – Par...
Azure Integration DTAP Series, How to go from Development to Production – Par...Azure Integration DTAP Series, How to go from Development to Production – Par...
Azure Integration DTAP Series, How to go from Development to Production – Par...
BizTalk360
 
AWS Code Services
AWS Code ServicesAWS Code Services
AWS Code Services
Amazon Web Services
 
Azure Integration DTAP Series, How to go from Development to Production – Par...
Azure Integration DTAP Series, How to go from Development to Production – Par...Azure Integration DTAP Series, How to go from Development to Production – Par...
Azure Integration DTAP Series, How to go from Development to Production – Par...
BizTalk360
 

Similar to Continuous integration in games development (20)

HoloLens Unity Build Pipelines on Azure DevOps
HoloLens Unity Build Pipelines on Azure DevOpsHoloLens Unity Build Pipelines on Azure DevOps
HoloLens Unity Build Pipelines on Azure DevOps
 
Working with the AOSP - Linaro Connect Asia 2013
Working with the AOSP - Linaro Connect Asia 2013Working with the AOSP - Linaro Connect Asia 2013
Working with the AOSP - Linaro Connect Asia 2013
 
Intro to JavaScript Tooling in Visual Studio Code
Intro to JavaScript Tooling in Visual Studio CodeIntro to JavaScript Tooling in Visual Studio Code
Intro to JavaScript Tooling in Visual Studio Code
 
Automated Build using teamcity
Automated Build using teamcityAutomated Build using teamcity
Automated Build using teamcity
 
Android build on windows
Android build on windowsAndroid build on windows
Android build on windows
 
How do we test nodejs apps?
How do we test nodejs apps?How do we test nodejs apps?
How do we test nodejs apps?
 
Webinar - Unbox GitLab CI/CD
Webinar - Unbox GitLab CI/CD Webinar - Unbox GitLab CI/CD
Webinar - Unbox GitLab CI/CD
 
[Gstar 2013] Unity Security
[Gstar 2013] Unity Security[Gstar 2013] Unity Security
[Gstar 2013] Unity Security
 
Android Platform Debugging and Development
Android Platform Debugging and DevelopmentAndroid Platform Debugging and Development
Android Platform Debugging and Development
 
Developing NuGet
Developing NuGetDeveloping NuGet
Developing NuGet
 
Android Platform Debugging and Development
Android Platform Debugging and DevelopmentAndroid Platform Debugging and Development
Android Platform Debugging and Development
 
GeoServer Developers Workshop
GeoServer Developers WorkshopGeoServer Developers Workshop
GeoServer Developers Workshop
 
Android Platform Debugging and Development
Android Platform Debugging and DevelopmentAndroid Platform Debugging and Development
Android Platform Debugging and Development
 
The Android Build System - Android Marshmallow
The Android Build System - Android MarshmallowThe Android Build System - Android Marshmallow
The Android Build System - Android Marshmallow
 
Modern Development Tools
Modern Development ToolsModern Development Tools
Modern Development Tools
 
Lezione 02 React and React Native installation and Configuration
Lezione 02   React and  React Native installation and ConfigurationLezione 02   React and  React Native installation and Configuration
Lezione 02 React and React Native installation and Configuration
 
Android Platform Debugging and Development
Android Platform Debugging and DevelopmentAndroid Platform Debugging and Development
Android Platform Debugging and Development
 
Azure Integration DTAP Series, How to go from Development to Production – Par...
Azure Integration DTAP Series, How to go from Development to Production – Par...Azure Integration DTAP Series, How to go from Development to Production – Par...
Azure Integration DTAP Series, How to go from Development to Production – Par...
 
AWS Code Services
AWS Code ServicesAWS Code Services
AWS Code Services
 
Azure Integration DTAP Series, How to go from Development to Production – Par...
Azure Integration DTAP Series, How to go from Development to Production – Par...Azure Integration DTAP Series, How to go from Development to Production – Par...
Azure Integration DTAP Series, How to go from Development to Production – Par...
 

Recently uploaded

一比一原版(USF毕业证)旧金山大学毕业证如何办理
一比一原版(USF毕业证)旧金山大学毕业证如何办理一比一原版(USF毕业证)旧金山大学毕业证如何办理
一比一原版(USF毕业证)旧金山大学毕业证如何办理
dakas1
 
Lecture 2 - software testing SE 412.pptx
Lecture 2 - software testing SE 412.pptxLecture 2 - software testing SE 412.pptx
Lecture 2 - software testing SE 412.pptx
TaghreedAltamimi
 
Oracle 23c New Features For DBAs and Developers.pptx
Oracle 23c New Features For DBAs and Developers.pptxOracle 23c New Features For DBAs and Developers.pptx
Oracle 23c New Features For DBAs and Developers.pptx
Remote DBA Services
 
GreenCode-A-VSCode-Plugin--Dario-Jurisic
GreenCode-A-VSCode-Plugin--Dario-JurisicGreenCode-A-VSCode-Plugin--Dario-Jurisic
GreenCode-A-VSCode-Plugin--Dario-Jurisic
Green Software Development
 
Measures in SQL (SIGMOD 2024, Santiago, Chile)
Measures in SQL (SIGMOD 2024, Santiago, Chile)Measures in SQL (SIGMOD 2024, Santiago, Chile)
Measures in SQL (SIGMOD 2024, Santiago, Chile)
Julian Hyde
 
fiscal year variant fiscal year variant.
fiscal year variant fiscal year variant.fiscal year variant fiscal year variant.
fiscal year variant fiscal year variant.
AnkitaPandya11
 
一比一原版(UMN毕业证)明尼苏达大学毕业证如何办理
一比一原版(UMN毕业证)明尼苏达大学毕业证如何办理一比一原版(UMN毕业证)明尼苏达大学毕业证如何办理
一比一原版(UMN毕业证)明尼苏达大学毕业证如何办理
dakas1
 
zOS Mainframe JES2-JES3 JCL-JECL Differences
zOS Mainframe JES2-JES3 JCL-JECL DifferenceszOS Mainframe JES2-JES3 JCL-JECL Differences
zOS Mainframe JES2-JES3 JCL-JECL Differences
YousufSait3
 
Preparing Non - Technical Founders for Engaging a Tech Agency
Preparing Non - Technical Founders for Engaging  a  Tech AgencyPreparing Non - Technical Founders for Engaging  a  Tech Agency
Preparing Non - Technical Founders for Engaging a Tech Agency
ISH Technologies
 
UI5con 2024 - Keynote: Latest News about UI5 and it’s Ecosystem
UI5con 2024 - Keynote: Latest News about UI5 and it’s EcosystemUI5con 2024 - Keynote: Latest News about UI5 and it’s Ecosystem
UI5con 2024 - Keynote: Latest News about UI5 and it’s Ecosystem
Peter Muessig
 
UI5con 2024 - Boost Your Development Experience with UI5 Tooling Extensions
UI5con 2024 - Boost Your Development Experience with UI5 Tooling ExtensionsUI5con 2024 - Boost Your Development Experience with UI5 Tooling Extensions
UI5con 2024 - Boost Your Development Experience with UI5 Tooling Extensions
Peter Muessig
 
E-commerce Development Services- Hornet Dynamics
E-commerce Development Services- Hornet DynamicsE-commerce Development Services- Hornet Dynamics
E-commerce Development Services- Hornet Dynamics
Hornet Dynamics
 
All you need to know about Spring Boot and GraalVM
All you need to know about Spring Boot and GraalVMAll you need to know about Spring Boot and GraalVM
All you need to know about Spring Boot and GraalVM
Alina Yurenko
 
How to write a program in any programming language
How to write a program in any programming languageHow to write a program in any programming language
How to write a program in any programming language
Rakesh Kumar R
 
Modelling Up - DDDEurope 2024 - Amsterdam
Modelling Up - DDDEurope 2024 - AmsterdamModelling Up - DDDEurope 2024 - Amsterdam
Modelling Up - DDDEurope 2024 - Amsterdam
Alberto Brandolini
 
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
mz5nrf0n
 
Oracle Database 19c New Features for DBAs and Developers.pptx
Oracle Database 19c New Features for DBAs and Developers.pptxOracle Database 19c New Features for DBAs and Developers.pptx
Oracle Database 19c New Features for DBAs and Developers.pptx
Remote DBA Services
 
YAML crash COURSE how to write yaml file for adding configuring details
YAML crash COURSE how to write yaml file for adding configuring detailsYAML crash COURSE how to write yaml file for adding configuring details
YAML crash COURSE how to write yaml file for adding configuring details
NishanthaBulumulla1
 
WWDC 2024 Keynote Review: For CocoaCoders Austin
WWDC 2024 Keynote Review: For CocoaCoders AustinWWDC 2024 Keynote Review: For CocoaCoders Austin
WWDC 2024 Keynote Review: For CocoaCoders Austin
Patrick Weigel
 
E-Invoicing Implementation: A Step-by-Step Guide for Saudi Arabian Companies
E-Invoicing Implementation: A Step-by-Step Guide for Saudi Arabian CompaniesE-Invoicing Implementation: A Step-by-Step Guide for Saudi Arabian Companies
E-Invoicing Implementation: A Step-by-Step Guide for Saudi Arabian Companies
Quickdice ERP
 

Recently uploaded (20)

一比一原版(USF毕业证)旧金山大学毕业证如何办理
一比一原版(USF毕业证)旧金山大学毕业证如何办理一比一原版(USF毕业证)旧金山大学毕业证如何办理
一比一原版(USF毕业证)旧金山大学毕业证如何办理
 
Lecture 2 - software testing SE 412.pptx
Lecture 2 - software testing SE 412.pptxLecture 2 - software testing SE 412.pptx
Lecture 2 - software testing SE 412.pptx
 
Oracle 23c New Features For DBAs and Developers.pptx
Oracle 23c New Features For DBAs and Developers.pptxOracle 23c New Features For DBAs and Developers.pptx
Oracle 23c New Features For DBAs and Developers.pptx
 
GreenCode-A-VSCode-Plugin--Dario-Jurisic
GreenCode-A-VSCode-Plugin--Dario-JurisicGreenCode-A-VSCode-Plugin--Dario-Jurisic
GreenCode-A-VSCode-Plugin--Dario-Jurisic
 
Measures in SQL (SIGMOD 2024, Santiago, Chile)
Measures in SQL (SIGMOD 2024, Santiago, Chile)Measures in SQL (SIGMOD 2024, Santiago, Chile)
Measures in SQL (SIGMOD 2024, Santiago, Chile)
 
fiscal year variant fiscal year variant.
fiscal year variant fiscal year variant.fiscal year variant fiscal year variant.
fiscal year variant fiscal year variant.
 
一比一原版(UMN毕业证)明尼苏达大学毕业证如何办理
一比一原版(UMN毕业证)明尼苏达大学毕业证如何办理一比一原版(UMN毕业证)明尼苏达大学毕业证如何办理
一比一原版(UMN毕业证)明尼苏达大学毕业证如何办理
 
zOS Mainframe JES2-JES3 JCL-JECL Differences
zOS Mainframe JES2-JES3 JCL-JECL DifferenceszOS Mainframe JES2-JES3 JCL-JECL Differences
zOS Mainframe JES2-JES3 JCL-JECL Differences
 
Preparing Non - Technical Founders for Engaging a Tech Agency
Preparing Non - Technical Founders for Engaging  a  Tech AgencyPreparing Non - Technical Founders for Engaging  a  Tech Agency
Preparing Non - Technical Founders for Engaging a Tech Agency
 
UI5con 2024 - Keynote: Latest News about UI5 and it’s Ecosystem
UI5con 2024 - Keynote: Latest News about UI5 and it’s EcosystemUI5con 2024 - Keynote: Latest News about UI5 and it’s Ecosystem
UI5con 2024 - Keynote: Latest News about UI5 and it’s Ecosystem
 
UI5con 2024 - Boost Your Development Experience with UI5 Tooling Extensions
UI5con 2024 - Boost Your Development Experience with UI5 Tooling ExtensionsUI5con 2024 - Boost Your Development Experience with UI5 Tooling Extensions
UI5con 2024 - Boost Your Development Experience with UI5 Tooling Extensions
 
E-commerce Development Services- Hornet Dynamics
E-commerce Development Services- Hornet DynamicsE-commerce Development Services- Hornet Dynamics
E-commerce Development Services- Hornet Dynamics
 
All you need to know about Spring Boot and GraalVM
All you need to know about Spring Boot and GraalVMAll you need to know about Spring Boot and GraalVM
All you need to know about Spring Boot and GraalVM
 
How to write a program in any programming language
How to write a program in any programming languageHow to write a program in any programming language
How to write a program in any programming language
 
Modelling Up - DDDEurope 2024 - Amsterdam
Modelling Up - DDDEurope 2024 - AmsterdamModelling Up - DDDEurope 2024 - Amsterdam
Modelling Up - DDDEurope 2024 - Amsterdam
 
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
 
Oracle Database 19c New Features for DBAs and Developers.pptx
Oracle Database 19c New Features for DBAs and Developers.pptxOracle Database 19c New Features for DBAs and Developers.pptx
Oracle Database 19c New Features for DBAs and Developers.pptx
 
YAML crash COURSE how to write yaml file for adding configuring details
YAML crash COURSE how to write yaml file for adding configuring detailsYAML crash COURSE how to write yaml file for adding configuring details
YAML crash COURSE how to write yaml file for adding configuring details
 
WWDC 2024 Keynote Review: For CocoaCoders Austin
WWDC 2024 Keynote Review: For CocoaCoders AustinWWDC 2024 Keynote Review: For CocoaCoders Austin
WWDC 2024 Keynote Review: For CocoaCoders Austin
 
E-Invoicing Implementation: A Step-by-Step Guide for Saudi Arabian Companies
E-Invoicing Implementation: A Step-by-Step Guide for Saudi Arabian CompaniesE-Invoicing Implementation: A Step-by-Step Guide for Saudi Arabian Companies
E-Invoicing Implementation: A Step-by-Step Guide for Saudi Arabian Companies
 

Continuous integration in games development

  • 2. Heroes of order & chaos Continuous integration in game development
  • 3. Order 1. Idea 2. MVP feature freeze 3. R & D phase 4. Define target HW requirements 5. Predict performance optimisation (optional) 6. Develop & deploy
  • 4. Chaos 1. Development w/o source control a. Impossible code undo b. Impossible concurrent development c. No development history 2. Development w/o unit tests a. Time loss due to manual testing b. Regression bugs 3. Manual deployment
  • 5. Discipline Your source code BEATING THE CHAOS Based on Vincent Driessen’s post.
  • 6. Define Your labeling scheme X.Y.Z release feature hotfix
  • 7. GitFlow - Main branches
  • 8. GitFlow - Supporting branches features hotfixes
  • 10. GitFlow clients For lazy developers For hard-cores
  • 12. Continuous integration (CI) Automation of the following steps: integrate (GitFlow) build test deploy
  • 13. Prerequisites Jenkins Git Extensions Java Unity 3d Every specific platform requires its own topics. For example, android builds require android SDK to be installed on computer and set up in Unity. You MUST make sure it works before setting up build server.
  • 15. Triggering build on commit 1. Install git-client plugin on Jenkins ● Plugin url: https://wiki.jenkins-ci.org/display/JENKINS/Git+Client+Plugin 2. Navigate to .git folder of Your repo 3. Enter HOOKS sub-folder 4. Edit post-commit hook: ● curl http://yourserver/jenkins/git/notifyCommit?url=<URL of the Git repository>
  • 16. Running Unity3d build from Jenkins 1. Install Unity3dBuilder plugin in Jenkins ● Plugin url: https://wiki.jenkins-ci.org/display/JENKINS/Unity3dBuilder+Plugin 2. Add “Invoke Unity editor” build step in Jenkins with following command: ● -quit -batchmode -nographics -executeMethod BuildScripts.BuildWebPlayer -projectPath [full project path] 3. Implement method BuildScripts.BuildWebPlayer in Unity3D project ● see appendix A for sample source code } Based on the GranCruGames blog. ● NOTE: If You don’t want to customize Your build with own script, You can use something like: ○ -quit -batchmode -projectPath "$WORKSPACE" -buildWindowsPlayer "Artifacts/game.x86.exe" -logFile "$WORKSPACE/unity3d_editor.log"
  • 17. Unit testing after build from Jenkins 1. Install Unity Test Tools from Asset Store ● Plugin url: https://www.assetstore.unity3d.com/en/#!/content/13802 2. Implement some unit tests in Your Unity project 3. Add “Invoke Unity editor” build step with following command: ● -batchmode -executeMethod UnityTest.Batch.RunUnitTests -quit -resultFilePath=”$WORKSPACETestsUnitresult.xml” Based on the RamblingCoder’s channel.
  • 18. Deploy after test from Jenkins 1. Install SSH Publish plugin in Jenkins ● Plugin url: https://wiki.jenkins-ci.org/display/JENKINS/Publish+Over+SSH+Plugin 2. Configure SSH Server 3. Add SSH file transfer build step }
  • 19. Report NUnit testing results 1. Install NUnit plugin in Jenkins ● Plugin url: https://wiki.jenkins-ci.org/display/JENKINS/NUnit+Plugin 2. Add “Publish NUnit test result report” post-build action: Based on the RamblingCoder’s channel.
  • 23. Appendix A Source code for custom build script: using UnityEditor; using System; class BuildScript { static void BuildWebPlayer () { string buildTarget = System.Environment.GetEnvironmentVariable("UNITY_BUILD_TARGET"); if (buildTarget == null || buildTarget.Length == 0) { throw new Exception("UNITY_BUILD_TARGET -system property not defined, aborting."); } string[] scenes = { "Assets/Level0.unity", "Assets/Level1.unity", "Assets/Level2.unity", "Assets/Level3.unity" }; string error = BuildPipeline.BuildPlayer(scenes, buildTarget, BuildTarget.WebPlayerStreamed, BuildOptions.None); if (error != null && error.Length > 0) { throw new Exception("Build failed: " + error); } }

Editor's Notes

  1. Hi everybody and welcome to my presentation. I am Nebojsa Brindic from Bincode Entertainment. We are gaming startup which develops AAA games for mobile devices. Our project “Svarog: The Awakening”, is recently funded by Eleven Accelerator. It’s an RPG game based on Slavic mythology.
  2. We were brave enough to jump into game industry right from the world of business apps, and, while facing many new, unknown challenges, we slowly started to apply our software experience in the development of aforementioned gaming project. That is actually our topic for today. The topic that is less known about, but the topic which saves You a lot of headaches. And that is continuous integration. I will not start with the definitions. It’s better to start just as the gaming project should start.
  3. First of all, You got an idea that will blow the market and earn millions of dollars. Ideas are usually so wide and so full of details, that You will need 100-people team in order to develop it. And, althought You think Your idea is nothing but failure without any of these cool features, You have to be aware that You are walking on the thin string which will break sooner or later. So what is the solution? Sit back, relax Yourself, and think about minimum set of features that, together, can constitute smaller, playable game. It’s not that this game will be blockbuster like Your final idea, but think about the featureset that can be at least good enough to have some minimal user base. And, once You know all the features in your MVP (minimum viable product), LOCK THEM! Do not allow anyone or anything to change Your mind and push You in the direction of adding new features. Because You will be literally dead if You do so. Actually - You will enter the never-ending development cycle. When You finally understood the importance of this, and once You locked the features, go on with research & development. Here You have to examine and investigate all the potential glitches and challenges You will face during the development. Use Google. Ask some experienced developers about Your doubts. The point is to make Your ground stable. This step will usually give You the answers on the questions like: which technology we will use to develop code, how we will test, which formats of UI sketches do the programmers need, how to import animations in dev environment, et cetera. This will lead You on the next step, and that is - what is Your target hardware? If You do not care about Samsung S3, S4, and S5, and You want to develop only for S6+, You will have much more computation resources available, so You will save precious time by ignoring some optimisations. If, on the other hand, You care about lower performance devices, You will have to do a research about how to boost performance of Your game. In the end, with all the knowledge You gathered, You can start. And here comes the trouble :-)
  4. From order, we are jumping directly into chaos. Actually, it will become chaos if You do these things. The worst thing one developer in the 21st century can do is to develop without source control. If he does this, he is not good developer. If You ask why, well - first of all - You can make a mistake without worry that something will be lost. Furthermore - it’s incredibly simple to develop same code in parallel with other developers. When You finally realized the importance of source code management, You have to know that testing is also crucial aspect of development. Unit tests became so useful and so big time-saviors, that You really wish to incorporate them into Your development. Because they largely free You from stupid and time-consuming manual testing of Your code. And they make sure that Your code will be tested with each new feature and upgrade. When everything is in place, and the game is developed and tested, it should be deployed. In many cases, deployment requires numerous configurations and repetitive procedures. It is pointless to do it each time manually, both because of time and because of possible errors due to human factor.
  5. So, how to beat the chaos? First, let’s see how we should organize our source code development.
  6. The first step in ordering Your chaos is to define Your labeling scheme. The way we work in our company is as simple as possible: First number marks the release, second number marks the feature, and the third marks the hotfix. Have on mind that this is not decimal notation, so You can easily see the labels such like 3.231.44.
  7. Then, we start with source control management. In this talk, we will use git, as it is used by us in Bincode. And we will present GitFlow branching strategy, as it is by far the most advanced strategy which gives You great structure and big discipline. The idea is to use develop branch as the unique place for development purposes. For adding new features, for correcting some development bugs, for literally everything related to development. Once You reach some reasonable feature set You planned, merge develop branch to master, and tag it with release mark. The outcome of this procedure is that master branch will always contain ONLY stable releases.
  8. Now, let’s assume You want to add new feature. You will use new branch from develop for every new feature. When You finish with it, just merge it back with develop branch. So, imagine that You’ve added 4 features, and now You want to do a release. You will merge develop branch with master. After one month of production use by some of Your clients, You got a feedback that there is a bug with some calculations when You press “OK” on the form for invoices. It’s urgent to fix. OK. Responsible developer will make new branch from master branch for that bug correction. After bug correction, hotfix branch is merged back to master, and that commit will be tagged appropriately.
  9. This is pretty much everything about source code order. On this image You can see one more branch, and that is release branch. Personally, I don’t use it, but it is good when You want to keep track of release notes, etc. Generally, the point of GitFlow is to give You well-structured and disciplined code base. And it certainly does it.
  10. There are some tools which can speed up Your branching, without letting You to enter all the git commands in shell. SourceTree is GUI tool by Atlassian, and it’s very user-friendly and idiot-proof. And so is git-flow cheatsheet, but it is set of shell commands that simplify raw git commands. So - use them as You wish ;-)
  11. The second aspect of development boosting is - automation. It is the thing that will speed up Your development and bring You the production like on the conveyor belt.
  12. We have seen how we can develop in disciplined manner, but what after that? You have to build Your code, to test it, and to deploy it. Those are all candidates for automation. In the examples we will use Jenkins CI server, exactly the same server like we use in our development infrastructure.
  13. These are the prerequisites in order to turn the computer into game build server. It’s good to mention that, when installing Unity, it’s not enough to just install it. If Your project is android, or iOS-based, each of these platforms require their own specific setup procedures and possibly SDK-s to download and setup. Please reffer to platform documentation in order to setup unity properly.
  14. So how the infrastructure looks like? Firt of all - we have centralized git repository, where all the code changes are commited by all the developers. The idea behind automation is to do the build, test and deploy each time the code is commited. By doing that, You will make sure that each change will satisfy the tests without errors, and that You will always have the last version deployed somewhere on Your test servers. Without a single minute spent by You or any of the developers on deployment, testing or building.
  15. So let’s dive into the procedure. As soon as code is commited, git should trigger jenkins server, which will checkout last code, build it with Unity, send it to testing, and deploy output files. This is done via git hooks. Actually - post-commit hook. Post-commit hook will be called each time git repository is commited to. Hook is simply the set of custom shell commands. In this situation, we want to inform Jenkins server that our repository has new commit. We are doing curl web call to Jenkins’ git plugin API. As our Jenkins project is set to checkout from this repository, it will automatically trigger whole procedure.
  16. After hook has triggered the procedure, our code will be checked-out, and building should start. For this purpose, we need Unity 3d Builder plugin. It will allow us to define Unity Editor invocation, where we will invoke our unity command line, and build project from there. Have on mind that You can either build the project with default factory settings, or build the project with Your custom build scripts. Consult Appendix A for sample build script.
  17. After the code-building step, we will define testing step with the use of Unity Test Tools. The procedure is the same as in previous step, but only the command is slightly different, and we should implement our test cases using Unity Test Tools.
  18. In the end - we have compiled and tested code. We want to deploy. I am just giving You the idea with this SSH plugin, but You should implement this step according to Your needs. You can make a set of shell commands that do the FTP host, SCP host, or something else. I will leave that to You for homework :-)
  19. As the final step, we want to have nice graphic report which gives us an insight into build & testing status. With the use of NUnit plugin for Jenkins, we can get exactly what we want.
  20. This is the end result. Here You can see how the system looks like after all of these setups. You have build history section, You have testing report, and You can download each build. That’s exactly what we wanted, isn’t it?
  21. So, this is it. In the end, I want to say again that implementing GitFlow in Your development gives You the ordered, structured and disciplined routine. You cannot get lost in such environment. And with the use of CI server, You saved Yourself precious time previously used on testing and deployment. That is gone now. You can finally concentrate on development.
  22. Thank You for listening!