3. CHANGE
MANAGEMENT
APPROVAL
REQUEST?!W^#
^!@!&*#?
MODERN CI/CD SERVICE
• GitHub/Bitbucket/GitLab integration
• Support for many popular languages
• Deployments (AWS, GCE, Azure, Heroku etc)
• Build configuration stored in the repository
• Builds executed in virtual machines
• Output streamed live
• Pipeline as a code
• CLI support
• Plugins
• Notifications (Email, Slack, HipChat, etc)
12. It is open source under an Apache 2 license and can be installed
on your own infrastructure for free.
https://github.com/drone/drone
DRONE.IO is a Continuous Delivery
platform built on Docker, written in Go.
16. CHANGE
MANAGEMENT
APPROVAL
REQUEST?!W^#
^!@!&*#?
DRONE PROS
• The service is nice and simple. Easy to setup & maintain!
• Lightweight CI/CD open source system written in Go (low resources usage)
• Multi tenant system
• Scales and grows with your team (drone agents)
• Source control driven configuration (YAML)
• Build on Docker for full customization (Isolated builds)
• Access granted via Github Oauth and scoped to repo perms automatically
• No more managing multiple jenkins (use docker modules)
• Plugins can be written in any language that can read env vars
• Support database engines (MySQL/Postgres/SQLite)
• Cross compatible with Jenkins or any other Docker based CI service
17. CHANGE
MANAGEMENT
APPROVAL
REQUEST?!W^#
^!@!&*#?
DRONE CONS
• The single DB used for storing data on build logs etc.
could be a single point of failure unless accounted for feature
• The lack of features compared to Jenkins
• Settings are too simple, with no way to customize (no
permissions configuration)
• No crons?!
• Limitations like "This feature is only available in
the Enterprise Edition" or "Coming Soon”
18. INSTALLATION
• Single binary, just execute (with only a single OS dependency --
Docker)
• Docker image (preferred way). Runs on ECS cluster as a service
• Configuration through environment variables
• Scale with build agents (poll the central drone server for jobs)
• Can use RDS PostgresSQL as an alternate storage (default storage
engine is an embedded SQLite database which requires zero
installation or configuration.)
21. CONCEPTS - Plugins
• Plugin is actually just a Docker image
• Container created and executed as part of
pipeline
• Exit code determines success or failure
http://plugins.drone.io
https://github.com/drone-plugins
23. CONCEPTS - Pipeline
• List of steps to build, test and deploy your code
• Success determinates by exit code
• Defined in repo root dir as .drone.yml
• Drone retrieves the .drone.yml file for your commit / branch. If
you make a change to the .drone.yml in a branch it does not
impact master.
• Parallel step execution (group)
• Local build testing & debugging with drone cli
• Skip builds by [ci skip] [skip ci] in commit
26. CONCEPTS - Services
• Set of services needed in build process
(databases, ip server)
• Available on the same network namespace as
build containers
• Services are accessed using custom hostnames
• Handy for DB`s used in testing
27. CONCEPTS - Matrix
• Build and test a single commit against multiple
configurations
• Variables are interpolated in the yaml using the
${VARIABLE} syntax, before the yaml is parsed
• Drone executes a separate build task for each
combination in the matrix
30. CONCEPTS - Secrets
• Keep your secrets out ofVCS (credstash, aws ssm parameter-store)
• Injected into build containers as vars or plain text =)
• Secrets can be added to the Drone secret store through CLI or UI (drone
secret add )
• Limit to specific container or all images, repository in your pipeline
• Available in the env. Mount a .env file into to container at /.env and drone
would read parameters from this file.
• Secrets in parameter expressions should be escaped (echo $${SECRET})
31. CONCEPTS - Constraints
• Pipeline Conditions (branch name, prefix/* , build status, github
events, environment)
• Step Conditions: limit steps build status or by Events: tag, push,
pull_request, deployment
• Execute a step using custom include and exclude logic
• Platform:[linux/*, windows/amd64]
• Limit execution of build steps by instances
• String Substitution (build metadata, ${DRONE_BRANCH///-})
• EnvVariables Reference (DRONE_COMMIT_SHA, etc.)
32.
33. DO NOT BE
SEDUCED BY
THE
TECHNOLOGY!
A curates list of awesome Drone resources
https://github.com/drone/awesome-drone
https://github.com/drone-demos
https://habrahabr.ru/post/324588/
https://www.2d1o.ru/episodes/s02e02.html
https://github.com/go-training/drone-tutorial
THANK
YOU!