Hudson / Jenkins for iOS
or having Chuck Norris watch over your code
NSConference 2011 - Mar 2011




                                 Eric Bariaux - AppsDojo
Background

 Eric Bariaux   ebariaux@appsdojo.com      @ebariaux




   NeXTSTEP & OpenStep                  Java
Agenda

• Show how straightforward and easy it is to put a project
  under CI

• Explore what’s possible beyond running unit tests
Continuous Integration

• Automate build and tests and ...

• Use SCM, commit often

• Every commit to main branch triggers a build

• Everyone sees the results
Example

• CI for iOS using Jenkins
Jenkins cheat sheet

• http://tomcat.apache.org

• http://jenkins-ci.org

   • http://wiki.jenkins-ci.org/display/JENKINS/Plugins

   • git, HTML Publisher, Chuck Norris

   • SICCI for Xcode

• http://github.com/ciryon/OCUnit2JUnit.git
Going further

• More QA : CLANG

  • http://clang-analyzer.llvm.org/
clang.sh

 rm -rf build

 mkdir build

 ./checker-255/scan-build
 --status-bugs -o build/scan-build
 /Developer/usr/bin/xcodebuild -target AwesomeAlgorithm
 -configuration "Debug" -sdk iphonesimulator4.3
clang.sh

 if [ "$?" -ne "0" ]; then

      mv build/scan-build/* build/scan-build-result

      exit -1

 else

      mkdir build/scan-build-result

  echo '<html><body>No CLANG issues detected</body></html>'
 > build/scan-build-result/index.html

 fi
Going further

• Documentation

  • http://www.gentlebytes.com/home/appledocapp
Going further

• Dependency management
Thank you




   iOS Mentoring - Training - Application development
  ebariaux@appsdojo.com      http://www.appsdojo.com

Using Jenkins with iOS projects

  • 2.
    Hudson / Jenkinsfor iOS or having Chuck Norris watch over your code NSConference 2011 - Mar 2011 Eric Bariaux - AppsDojo
  • 3.
    Background Eric Bariaux ebariaux@appsdojo.com @ebariaux NeXTSTEP & OpenStep Java
  • 4.
    Agenda • Show howstraightforward and easy it is to put a project under CI • Explore what’s possible beyond running unit tests
  • 5.
    Continuous Integration • Automatebuild and tests and ... • Use SCM, commit often • Every commit to main branch triggers a build • Everyone sees the results
  • 6.
    Example • CI foriOS using Jenkins
  • 7.
    Jenkins cheat sheet •http://tomcat.apache.org • http://jenkins-ci.org • http://wiki.jenkins-ci.org/display/JENKINS/Plugins • git, HTML Publisher, Chuck Norris • SICCI for Xcode • http://github.com/ciryon/OCUnit2JUnit.git
  • 8.
    Going further • MoreQA : CLANG • http://clang-analyzer.llvm.org/
  • 9.
    clang.sh rm -rfbuild mkdir build ./checker-255/scan-build --status-bugs -o build/scan-build /Developer/usr/bin/xcodebuild -target AwesomeAlgorithm -configuration "Debug" -sdk iphonesimulator4.3
  • 10.
    clang.sh if ["$?" -ne "0" ]; then mv build/scan-build/* build/scan-build-result exit -1 else mkdir build/scan-build-result echo '<html><body>No CLANG issues detected</body></html>' > build/scan-build-result/index.html fi
  • 11.
    Going further • Documentation • http://www.gentlebytes.com/home/appledocapp
  • 12.
  • 13.
    Thank you iOS Mentoring - Training - Application development ebariaux@appsdojo.com http://www.appsdojo.com

Editor's Notes

  • #2 \n
  • #3 \n
  • #4 Started with NeXTSTEP and OpenStep, foundation, EOF, ... Tools were not there yet, barely version control, no automated testing\nJava world, software methodologies matured, strong focus on unit testing, continuous integration, ...\n
  • #5 \n
  • #6 build, test and more: can integrate a ton of other aspects of control into the automation, doc generation, publishing, ...\n\nversion control, commit as soon as the build should not break\n\neveryone sees results -&gt; if team, also useful for indie\n
  • #7 Let&amp;#x2019;s set-up continuous integration for our project, using Hudson\nUsed in the java world, runs in any servlet container, let&amp;#x2019;s use tomcat\n
  • #8 \n
  • #9 \n
  • #10 \n
  • #11 \n
  • #12 \n
  • #13 \n
  • #14 \n