Giter Site home page Giter Site logo

palttuk / ios-ci-jenkins-example Goto Github PK

View Code? Open in Web Editor NEW

This project forked from unsafepointer/ios-ci-jenkins-example

0.0 2.0 0.0 67 KB

This is a CI example with an iOS application using xctool, CocoaPods, AFNetworking, OCMockito, OCHamcrest, gcovr, oclint, cloc, PMD and Jenkins.

License: MIT License

Ruby 0.37% Shell 2.77% Objective-C 96.86%

ios-ci-jenkins-example's Introduction

Continuous Integration on iOS with Jenkins

Description:

This is a continuous integration example with an iOS application using xctool as the build system, CocoaPods as the dependency manager, AFNetworking for asynchronous networking inside the iOS app, OCMockito for mock and stub unit testing, OCHamcrest for unit testing matchers, gcovr for test coverage reporting, oclint for static analysis reporting, cloc for software lines of code count reporting, PMD for duplicate code reporting and Jenkins as the continuous integration server. You can find the detail setup and explanations for all these in my blog.

Building:

In order to build the application, clone this repo:

$ git clone [email protected]:Ruenzuo/ios-ci-jenkins-example.git

Then set up the dependencies and open the workspace and you're ready to go:

$ cd ios-ci-jenkins-example && pod install && open WeatherApp.xcworkspace

screenshot-1  screenshot-2 screenshot-3

Jenkins Dashboard:

The main objective here is to have a quality metrics dashboard on Jenkins:

test_results

code_coverage

static_analysis

sloc_count

duplicate_code

You only need to add an Execute shell step on you Jenkins job like this:

./Scripts/Pods.sh
./Scripts/Coverage.sh
./Scripts/StaticAnalysis.sh
./Scripts/PMD.sh
./Scripts/Sloccount.sh
./Scripts/TestResults.sh

For more information on how to get started with each tool/framework, go to:
xctool
CocoaPods
AFNetworking
OCMockito
OCHamcrest
gcovr
oclint
cloc
PMD
Jenkins

The following Jenkins plugins have been used for the dashboard:
Test results: Regular Jenkins JUnit test result report plugin
Code coverage
Static analysis
Sloc count
Duplicate code

If you examine closely the scripts, this helpers tools have been used:
reattach-to-user-namespace
Objective-C-CPD-Language
xsltproc

To-Do

  • [✓] Make it public.
  • [✓] Write the blog post. It's here.
  • [ ] Continuous delivery setup: app signing and Testflight integration.
  • [ ] Currently, I'm executing the unit tests twice, because I'm using two different reporters each time. I think this could be improved.

License

The MIT License (MIT)

Copyright (c) 2014 Renzo Crisóstomo

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

ios-ci-jenkins-example's People

Contributors

cegonya avatar palttuk avatar

Watchers

 avatar  avatar

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.