automating your workflow - daniel pfeiffer at 360idev 2016

41
Copyright © 2016 Float. All rights reserved. www.gowithfloat.com Automating Your Workflow Daniel Pfeier @mediabounds

Upload: float

Post on 24-Jan-2017

195 views

Category:

Software


0 download

TRANSCRIPT

Copyright © 2016 Float. All rights reserved.www.gowithfloat.com

Automating Your WorkflowDaniel Pfeiffer • @mediabounds

Copyright © 2016 Float. All rights reserved.www.gowithfloat.com

Meet Floatbot

Copyright © 2016 Float. All rights reserved.www.gowithfloat.com

Lay of the Land

GitSource Control

(We roughly follow git-flow as our

branching strategy)

AssemblaTicket Management

(also hosts our git repositories)

SlackFacilitates team communication

HockeyAppDistributes builds

internally and externally

JenkinsAutomation server

Copyright © 2016 Float. All rights reserved.www.gowithfloat.com

An effective automated workflow works where your developers work.

Copyright © 2016 Float. All rights reserved.www.gowithfloat.com

Jenkins

Copyright © 2016 Float. All rights reserved.www.gowithfloat.com

An automated workflow goes beyond generating builds;

it facilitates team communication.

Copyright © 2016 Float. All rights reserved.www.gowithfloat.com

You don't need a fancy set of servers or hardware to begin automating your workflow.

Copyright © 2016 Float. All rights reserved.www.gowithfloat.com

Installing Jenkins

Copyright © 2016 Float. All rights reserved.www.gowithfloat.com

Installing Jenkins

Copyright © 2016 Float. All rights reserved.www.gowithfloat.com

Installing Jenkins

Copyright © 2016 Float. All rights reserved.www.gowithfloat.com

Installing Jenkins

Copyright © 2016 Float. All rights reserved.www.gowithfloat.com

Jenkins Overview

Copyright © 2016 Float. All rights reserved.www.gowithfloat.com

Jenkins Overview

Node Node

Copyright © 2016 Float. All rights reserved.www.gowithfloat.com

Jenkins Overview

Node

Executer

Executer

Node

Executer

Executer

Copyright © 2016 Float. All rights reserved.www.gowithfloat.com

Jenkins Overview

Node

Executer

Executer

Job

Node

Executer

Executer

Job

Job

Job

Copyright © 2016 Float. All rights reserved.www.gowithfloat.com

Jenkins Overview

Node

Executer

Executer

Job

Node

Executer

Executer

Job

JobJob

Copyright © 2016 Float. All rights reserved.www.gowithfloat.com

Jenkins Overview

Node

Executer

Job

All you need to get started is one node and one executor.

Copyright © 2016 Float. All rights reserved.www.gowithfloat.com

Plugins• Assembla merge request builder• Build Monitor View• Checkstyle Plug-in• Environment Injector Plugin• Git plugin• Google Play Android Publisher Plugin• Gradle Plugin• HockeyApp Plugin• JUnit Plugin• Managed Scripts

• promoted builds plugins• Slack Notification Plugin• Static Analysis Collector Plug-in• Task Scanner Plug-in• Warnings Plug-in• Xcode integration

and many, many more

Copyright © 2016 Float. All rights reserved.www.gowithfloat.com

DemoCreating a job in Jenkins

Copyright © 2016 Float. All rights reserved.www.gowithfloat.com

Three Types of Jobs

Copyright © 2016 Float. All rights reserved.www.gowithfloat.com

The CI Job (Continuous Integration)• Triggered automatically when a merge request is opened• Performs a static analysis and runs all available tests• Generates a .ipa file and links to it in the merge request• Upvotes or downvotes the merge request based on result

Provides an immediate review of new code and allows human reviews to be be focused

on logic and not on style.

1

Copyright © 2016 Float. All rights reserved.www.gowithfloat.com

An aside: Code Reviews• We are a team

• Every line of code should be seen by at least two humans• No one is individually responsible for shipping a broken app

• We are a team of experts

• Each member offers unique perspectives on how to solve problems • Builds shared knowledge throughout the team

Copyright © 2016 Float. All rights reserved.www.gowithfloat.com

The Nightly Job• Triggered automatically each night

(if there are new commits)• Performs a static analysis and runs all available tests• Uploads build to HockeyApp and sends to team• Updates tickets impacted by the build• Posts notifications in Slack

Provides the QA team with an always up-to-date build so that feedback loops are short.

2

Copyright © 2016 Float. All rights reserved.www.gowithfloat.com

The Nightly Job• Triggered manually requiring release notes to be entered• Automatically waits for QA team to approve nightly• Re-signs nightly build using client’s distribution certificate• Uploads build to HockeyApp and sends to client• Posts notifications in Slack

Provides clients transparency to the progress of the project with frequent beta builds.

2Promoted

Copyright © 2016 Float. All rights reserved.www.gowithfloat.com

The Release Job• Triggered manually when client approves builds• Requires build parameters for version and release notes• Uploads debug symbols to HockeyApp• Distributes build via App Store or MAM• Posts notifications in Slack

Reduces the effort of shipping to users so we can rapidly add new features or respond to bugs.

3

Copyright © 2016 Float. All rights reserved.www.gowithfloat.com

Having an automated workflow is not like having an employee...

it's more like having a puppy.

Copyright © 2016 Float. All rights reserved.www.gowithfloat.com

Tips for Effective Automation

Copyright © 2016 Float. All rights reserved.www.gowithfloat.com

Use the Release build configuration1

Copyright © 2016 Float. All rights reserved.www.gowithfloat.com

Verify your App ID settings2

Copyright © 2016 Float. All rights reserved.www.gowithfloat.com

Verify your App ID settings2

Copyright © 2016 Float. All rights reserved.www.gowithfloat.com

Publish and track build warnings3Warnings plugin

Copyright © 2016 Float. All rights reserved.www.gowithfloat.com

Build warnings eventually become build errors.

Copyright © 2016 Float. All rights reserved.www.gowithfloat.com

Scan source files for TODO or FIXME4Task Scanner plugin

Copyright © 2016 Float. All rights reserved.www.gowithfloat.com

Scan source files for TODO or FIXME4Task Scanner plugin

Copyright © 2016 Float. All rights reserved.www.gowithfloat.com

Scan source files for TODO or FIXME4Task Scanner plugin

Copyright © 2016 Float. All rights reserved.www.gowithfloat.com

Implement a static analysis process5Analysis Collector plugin

Copyright © 2016 Float. All rights reserved.www.gowithfloat.com

Mark substandard builds as unstable6

Copyright © 2016 Float. All rights reserved.www.gowithfloat.com

An effective automated workflow focuses on providing clear,

detailed information.

Copyright © 2016 Float. All rights reserved.www.gowithfloat.com

Beyond Automated Builds

Copyright © 2016 Float. All rights reserved.www.gowithfloat.com

It is important to truly understand a process before it can be automated.

Copyright © 2016 Float. All rights reserved.www.gowithfloat.com

Daniel Pfeiffer • @mediabounds