Project Name | Stars | Downloads | Repos Using This | Packages Using This | Most Recent Commit | Total Releases | Latest Release | Open Issues | License | Language |
---|---|---|---|---|---|---|---|---|---|---|
Excoveralls | 760 | 1,949 | 25 | a day ago | 76 | July 15, 2022 | 70 | mit | Elixir | |
Coverage report tool for Elixir with coveralls.io integration. | ||||||||||
Hands On Devops | 292 | 2 years ago | bsd-3-clause | Shell | ||||||
A hands-on DevOps course covering the culture, methods and repeated practices of modern software development involving Packer, Vagrant, VirtualBox, Ansible, Kubernetes, K3s, MetalLB, Traefik, Docker-Compose, Docker, Taiga, GitLab, Drone CI, SonarQube, Selenium, InSpec, Alpine 3.10, Ubuntu-bionic, CentOS 7... | ||||||||||
Env Ci | 218 | 6,526 | 164 | 3 days ago | 71 | December 06, 2022 | 9 | mit | JavaScript | |
Get environment variables exposed by CI services | ||||||||||
Serverless Reference Implementation | 164 | 5 months ago | 5 | mit | C# | |||||
Serverless reference implementation guidance | ||||||||||
Drone Scp | 118 | 25 days ago | 26 | June 15, 2022 | 27 | mit | Go | |||
Copy files and artifacts via SSH using a binary, docker or Drone CI. | ||||||||||
Drone Tree Config | 99 | 18 days ago | 24 | May 17, 2021 | 7 | apache-2.0 | Go | |||
Drone helper for mono repositories. | ||||||||||
Terraform Multienv | 89 | 2 years ago | 3 | mit | Shell | |||||
A template for maintaining a multiple environments infrastructure with Terraform. This template includes a CI/CD process, that applies the infrastructure in an AWS account. | ||||||||||
Deploy Drone | 88 | 4 years ago | 1 | mit | Shell | |||||
Deploy Drone CI to enable continuous integration ⚡️ on your product | ||||||||||
Continuous_analysis | 82 | 2 years ago | 1 | bsd-3-clause | Jupyter Notebook | |||||
Computational reproducibility using Continuous Integration to produce verifiable end-to-end runs of scientific analysis. | ||||||||||
Drone Line | 75 | 2 years ago | 18 | June 18, 2021 | mit | Go | ||||
Sending line notifications using a binary, docker or Drone CI. |
This repository aims to show how to build a continuos integration process using Drone CI. To get a full picture we recommend to read our blog post first. In blog post we describe how we do continuos integration at Maqpie and talk about why enjoy Drone CI so much.
Where to start?
The repository represent a typical Node.JS project, which has three services:
./deploy
directory has Ansible deployment scripts which publish built docker containers to the Ubuntu 16.04 and configure Nginx for the application..drone.yml
- deployment steps for Drone CImaster
branch builds all docker containers, publish them to the Dockerhub, run Ansible scripts to deploy application to pre-production or staging environment and notify about success or failures.production
branch builds all docker containers, publish them to the Dockerhub, run Ansible scripts to deploy application to production environment and notify about success or failures.The drone command line tools are used to interact with the drone server from the command line, and provide important utilities for managing users and repository settings.
To connect to your Drone you need to export following variables in terminal:
export DRONE_SERVER=http://138.197.86.232
- this is url of your Drone installationexport DRONE_TOKEN=
- this is your personal authentication token, that can be found in Drone UI at https://MY_DRONE_URL/account
page. Just click on SHOW TOKEN
and copy it from thereNow, you should be able to interact with Drone CI using Drone CLI.
Plugins is a Drone way to integrate with a third party services, such as Amazon S3, Dockerhub and Slack. The full list of currently available plugins can be found here. Plugin is a docker container that execute a predefined task. In this sample project we use two plugins to achieve what we need:
Note: We use old version of Docker plugin to upload images over to the Dockerhub (plugins/docker:1.12
). The main reason for this is that we want to utilize Docker cache while The primary goal of this plugin is to build docker images with host machine isolation.
. Read this and this threads for more details and possible workarounds.
Drone has really nice way of sharing secret information, such as password and ssh keys in a secure way. We use Dockerhub to publish docker images, which require username and password. We also use Ansible to deploy our application over to the production server. To being able to do this we need supply our ssh key. Pushing secret information to the Github repository is a bad practice, creating one possibility for hackers to shut down your service.
Let's start from adding our ssh key:
drone global secret add SSH_KEY @/Users/andrew/.ssh/id_rsa-drone-demo
Now our ssh key should be available to Drone. The last step remaining is to add our Dockerhub credentials:
drone global secret add DOCKER_USERNAME YOUR_DOCKERHUB_USERNAME
drone global secret add DOCKER_PASSWORD YOUR_DOCKERHUB_PASSWORD
drone global secret add DOCKER_EMAIL YOUR_DOCKERHUB_EMAIL
Now this variables can be directly used in .drone.yml
. Here are small example, where we pass Dockerhub credentials to the Drone's Docker plugin:
publish-api-docker:
image: plugins/docker:1.12
username: ${DOCKER_USERNAME}
password: ${DOCKER_PASSWORD}
email: ${DOCKER_EMAIL}
Drone signature is a simple string the typically resides near your .drone.yml
as .drone.yml.sig
and generated using your access token from Drone UI.
Here is how signature works:
.drone.yml
you need to re-generate a signature.There is one possible scenario, where hacker might be able to get access to your keys. If you shell scripts as a command in .drone.yml
hacker can possibly change this shell script and, for example, make a post request with your ssh key to some endpoint. General security measures is always a good thing to do anyways.
As mentioned above, every time when you do some changes to your .drone.yml
file - you need to regenerate signature. You can do it using following command:
drone sign maqpie/drone-starter
Use your repository name as parameter for the drone sign
.
Note: docker sign
command will silently fail and won't create a .docker.yml.sig
file if repository is not enabled using Drone UI.
To play around and make fork of this repository work in your own Drone instance make sure to do few things:
.drone.yml
and in deploy/deploy-app.yml
to start with your name (anorsich/ds-api
, anorsich/ds-web
, anorsich/ds-landing
). You can create public images for free on Dockerhub.deploy/hosts/staging
and make sure that key, added to the Drone has access to it.After these changes Drone's build should be green. Create an issue if something went wrong and we will try to help!