Drone is a CI/CD platform built on Docker and written in Go.
Drone pipeline are written in .drone.yml
file in the root of the repository.
push
, pull_request
, tag
and deployment
eventspipeline:
backend:
image: golang
commands:
- go get
- go build
- go test
frontend:
image: node:6
commands:
- npm install
- npm test
notify:
image: plugins/slack
channel: developers
username: drone
Drone executes your build inside an ephemeral Docker Image, which means you don’t have to setup or install any repository dependencies.
Drone automatically clones your repository into a local volume that is mounted into each Docker container.
Drone mounts the workspace into your build container (Defined Image) and executes bash commands inside your build container, using the root of your repository as the working directory.
Drone supports launching service containers as part of the build process. This can be very helpful when your unit tests require database access etc.
Drone supports publish, deployments and notification capabilities through external plugins.
drone exec
# Create Value Secret (Concealed)
drone secret add --conceal <repo_path> <secretName> <secretValue>
# Create Value Secret
drone secret add <repo_path> <secretName> <secretValue>
# Create File Secret
drone secret add <repo_path> <secretName> @<filePath>
# View Secret for a Repo
drone secret ls <repo_path>
# Create Org Level Secret (Concealed)
drone org secret add --conceal <org> <secretName> <secretPass>
# Create Org Level Secret
drone org secret add <org> <secretName> <secretPass>
# Create Org Level File Secret
drone org secret add <org> <secretName> @<filePath>
pipeline:
docker:
image: plugins/docker
- username: ${DOCKER_USERNAME}
- password: ${DOCKER_PASSWORD}
+ secrets: [ docker_username, docker_password ]