Continuous Delivery

in Open Source

Hello!

Paul Shannon

  • Sr Engineer @ SitePen
  • Co-maintainer of Intern
  • SitePen Podcast
  • Phoenix TypeScript
  • devpaul

Dojo 2

Dojo 2 is a complete rewrite of the popular JavaScript toolkit released in 2004.

dojotoolkit.org

issues

  • Not frequently deployed
  • Difficult to update
  • various tools used to update the site
  • no automated testing

Dojo.io

A New Hope

dojo.io content

  • Blog
  • API Docs
  • Tutorials

Most important was removing barriers that prevented content being updated regularly

Continuous Delivery

A practice where software is produced in short cycles that may be released at any time

Continuous Delivery features

  • automation
  • builds
  • tests
  • approvals
  • deployment

Building the Site

Build

Hexo

Static site builder

  • Supports blogs
  • Written in JavaScript
  • Highly extensible
Automate

Grunt

Build Tool

  • Written in JavaScript
  • Familiar to the team
Test

Intern

Testing Framework

  • Written in JavaScript
  • Capable of handling any testing scenario
Approve

GitHub

Git Repository & Host

  • Git Repository
  • Code Review
  • GitHub Pages
  • Rich API
  • WebHooks and Integration
Deploy

Travis CI

Continuous Integration

  • Easy to Configure
  • Simple UI
  • GitHub Integration

Content Pipeline

PR is created

Travis starts a build

tslint checks examples

TypeScript compiles examples

Intern runs unit tests

Hexo builds static site

Intern runs functional tests

GitHub informed on test result

A human reviews the PR

PR is merged to master

Travis starts a build

commit to gh-pages branch

GitHub publishes dojo.io

There were issues...

Git & Travis

The Travis environment is not the same as a developer machine

  • GitHub requires user.name and user.email
  • Travis clones with https

Credential Management

Travis does not do credential management

  • GitHub needs a deployment key
  • Travis allows for secret environment variables on master

API Documentation

The Dojo package release cycle is independent from the dojo.io site

  • Travis doesn't support upstream/downstream builds
  • Travis allows for secret environment variables on master
  • Dojo packages build their API docs

GitHub API Calls

GitHub API calls are limited to 60 calls per hour from anonymous sources

  • Travis reuses IP addresses and build machines
  • API Documentation builds failed intermittently on Travis

GitHub Pages

GitHub Pages doesn't support https for custom domains

Questions?

Get Involved

Phoenix TypeScript

June Meetup

Getting Started with TypeScript

June 13 @ DriveTime

  • 30 minutes presentation
  • Questions & Answer
  • 1 hour open code session

Paul Shannon