Practical Comparison — From Jenkins to Drone CI

1. Pipeline Configuration as Code

  • Jenkins
  • Drone CI

2. Standarization Layer

  • Jenkins
unclassified:
globalLibraries:
libraries:
- name: "my-lib"
retriever:
modernSCM:
scm:
git:
remote: "https://git.example/jenkins-lib.git
// import library as per its name in the admin configuration 
@Library('my-lib') _
.....
...
// reuse step
my_step()
  • Drone CI
# drone template add [namespace] [name] [data]

3. In-pipeline Reusability

  • Jenkins
pipeline {    deploy('dev')
...
deploy('prod')
}def deploy(env) {
vault_pull('terraform/state');
sh("TERRAFORM_ENV=${env} terraform apply -auto-approve")
}
  • Drone CI
x-deploy: &x-deploy
image: terraform
commands:
- terraform apply -auto-approve
steps:
- name: deploy-to-dev
<<: *x-deploy
environment:
TERRAFORM_ENV: dev
- name: deploy-to-prod
<<: *x-deploy
environment:
TERRAFORM_ENV: prod

4. Parallelism (Steps Execution )

  • Jenkins
 step_build_x{}
step_build_y{}
parallel {
step_build_x{}
step_build_y{}
}
  • Drone CI
steps:
- name: init
image: ...
- name: build-x
image: ...
- name: build-y
image: ....
steps:
- name: init
image: ...
- name: build-x
image: ...
depends_on:
- init
- name: build-y
image: ...
depends_on:
- init

5. Global secrets

  • Jenkins
credentials:
system:
domainCredentials:
- credentials:
- string:
scope: GLOBAL
id: "aws-secret"
secret: "MySuperSecret"
description: "AWS Secret Key"
string(credentialsId: 'aws-secret', variable: 'AWS_SECRET_ACCESS_KEY') {
// it's now available as env var env.AWS_SECRET_ACCESS_KEY
sh 'aws cloudformation update-template'
}
  • Drone CI:
export DRONE_SERVER=http://drone.company.local DRONE_TOKEN=<admin-user-token>drone orgsecret add <myorg> aws-secret MySuperSecret
steps:
- image: amazon/aws-cli
command: aws cloudformation update-template ...
environment:
AWS_ACCESS_KEY_ID:
from_secret: aws-secret

6. External Secrets — Kubernetes Secrets

  • Jenkins
  • Drone CI

7. Trigger for specific files/folders updates

Bonus

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Abdennour Toumi

Abdennour Toumi

299 Followers

Software engineer, Cloud Architect, 5/5 AWS|GCP|PSM Certified, Owner of kubernetes.tn