CapsuleCD

Continuous Delivery for Versioned Libraries

Continuous Delivery for Versioned Libraries using CapsuleCD

Jason Kulatunga @AnalogJ

Who Am I?

Automate all the things? Obligatory XKCD

Packaging is Easy

Not exactly..

Not exactly..

Not exactly..

Packaging is Hard

Important as releasing a new version of your App
Harder because you don't do it very often and you'll forget steps

CapsuleCD

CapsuleCD

  1. Open Source
  2. Compliments your existing CI
  3. Written in Ruby
  4. Framework is language agnostic
  5. Extendable via pre/post hooks
  6. Overridable base steps
  7. Fully tested
  8. CapsuleCD dogfoods CapsuleCD

Docker Example

			CAPSULE_SOURCE_GITHUB_ACCESS_TOKEN=123456789ABCDEF \
			CAPSULE_RUNNER_REPO_FULL_NAME=AnalogJ/gem_analogj_test \
			CAPSULE_RUNNER_PULL_REQUEST=4 \
			CAPSULE_RUBYGEMS_API_KEY=ASDF12345F \
			docker run AnalogJ/capsulecd:ruby \
			capsulecd start --source github --package_type ruby
		

Demo

Demo

What just happened?

Step Description
source_configure authenticate to github
runner_retrieve_payload get PR info from source api
source_process_pr_payload the merged pull request is cloned
build_step missing files, compilation, version bumping
test_step package deps, package test runner
package_step commit changes locally, create git tag
release_step push the release to the package repository
source_release push the merged, versioned, tested code to GH

capsule.yml Config File

			source_git_parent_path: /srv/myclonefolder
			source_github_api_endpoint: https://git.corp.example.com/v2
			source_github_web_endpoint: https://git.corp.example.com/v2
			source_configure:
				pre: |
					# this is my multiline ruby script
					# the pre hook script runs before the step
					# we have access to any of the instance variables here.
					# check the documentation for more information.
		

AnalogJ/CapsuleCD

Fork me on GitHub