Skip to content

squaremonks/drone-ci

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Drone CI

How to set up your private delivery platform by using Drone and Bitbucket and your private docker registry.

Installation

Digitalocean

For this project we use a server from Digitalocean droplets. Create a droplet with a Docker image from the Marketplace. Add your ssh key to this droplet to enter console easily.

Server configuration

Allow traffic via port 443 to your server by adding the firewall rule.

$ ufw allow '443/tcp'

Copy the docker-compose.yml file as in this repository.

DRONE_BITBUCKET_CLIENT_ID: ''       # See OAuth in Bitbucket 
DRONE_BITBUCKET_CLIENT_SECRET: ''   # See OAuth in Bitbucket
DRONE_RPC_SECRET: ''                # A secret code that can be generated with openssl. 
DRONE_SERVER_HOST: ''               # name.domain.ext
DRONE_RPC_HOST: ''                  # name.domain.ext

Fill in your own information.

Run the docker-compose.yml file with detached so it can be runned on the background.

$ docker-compose up -d

How to add your drone secrets?

See more at Drone.io.

Example:

$ drone secret add --repository organization/repository -name docker_username --data your_username 

Bitbucket

Go to your account and add your consumer for OAuth.

Example:

Name: Drone
Callback URL: https://name.domain.ext/login
Check 'This is a private repository'.

Permissions:
Account: 
- E-mail
- Read

Pull requests:
- Read
- Write

Team membership:
- Read

Repositories:
- Read
- Write
- Admin

Webhooks:
- Read and write

Add .drone.yml (as an example) to your project and you are good to go to build images.

Credits and acknowledgements

Also see the list of contributors who participated in this project.

License

The docker-registry is licensed under the MIT License. Please see the LICENSE file for details.