# README
EZCD (pronounced 'Easy C.D.') is a CI/CD enhancement tool that integrates with your existing pipeline to provide faster feedback and accelerate your development
Why do you need EZCD?
EZCD helps you create effective CI/CD pipelines, enabling you to achieve shorter delivery times and produce higher quality software.
1. Get fast feedback using the EZCD Dashboard
Imagine working without an IDE's error checking or syntax highlighting. We need fast feedback loops to help us write the best code; the same applies to creating reliable and high-performing pipelines.
The EZCD dasboard provides a real-time, transparent view of your pipeline. You can instantly see which commits are in each stage of your workflow.
EZCD tracks the health of your pipeline, and alerts you to failures as soon as they occur. It keeps a notice in place so you can act quickly to unblock your team.
2. Improve your pipeline over time with DORA metrics
EZCD helps you continuously improve your processes by tracking the following metrics:
- Lead time: EZCD tracks the lead times of your commits. You can see how long it took before each commit was deployed to production.
- Deployment frequency: EZCD tracks your deployments and shows you how frequently you are delivering changes to your users.
By comparing this over time you can see how changes to your workflow impact the speed and efficiency of your pipeline.
3. Smart coordination of your acceptance test runs
Before you can deploy your changes, they need to run through the two main stages of a CI/CD pipeline.
- Commit stage
- Runs on every commit and can run in parallel on multiple commits at once
- Builds or creates a release candidate from the source
- Runs unit tests and other checks that can be completed quickly
- Acceptance stage
- Deploys a release candidate to a production-like environment and runs acceptance tests
- Runs other checks that are too slow to complete in the commit stage
- Can only run on one release candidate at a time
If you schedule an acceptance run after every successful release candidate you will create an ever-growing backlog of work.
EZCD tracks the successful release candidates and ensures that your acceptance stage jumps ahead to the newest release candidate.
Why isn't this possible natively in GitHub Actions?
GitHub Actions actually comes quite close - closer than GitLab Pipelines.You can restrict the parallelism of your acceptance workflow and configure it to queue up a new one after each sucessful commit-stage. But the queuing order is based on when the acceptance workflow was triggered, which can be different to the order in which the commits were created - imagine if your most recent commit completed its commit stage really quickly, then older commits would trigger the acceptance workflow and cancel the workflow for your latest commit: Not good!
4. Prioritisation of trunk based continuous delivery workflows
High performing teams need to use modern workflows like Trunk Based Development and Continuous Delivery.
This can make it hard for your team to adopt tools that assume your workflow includes Pull Requests and Feature Branches.
EZCD is the other way around and works best for modern trunk based workflows.
Getting Started
graph LR;
A["Your CI/CD pipeline"] --> B["EZCD CLI"];
B --> C["Postgres"];
D["EZCD Dashboard
Docker Container"] --> C;
1. Set up postgres
EZCD needs an external Postgres database to track information about your pipeline.
Set up the database using the schema file ./schema/projects_and_commits.sql
2. Add the EZCD_DATABASE_URL environment variable to your pipeline
The format should match:
postgresql://[user[:password]@][host][:port][/dbname][?param1=value1&...]
For example:
postgresql://user:password@your-ezcd-database-server:5432/ezcd
3. Install the CLI commands into your pipeline
GitHub Actions
env:
PROJECT_ID: your_project_id_here
commit-stage:
runs-on: ubuntu-latest
steps:
- name: Setup EZCD CLI using github action
uses: ezcdlabs/ezcd@main
with:
version: 0.1.0
- name: Commit stage started
run: ezcd-cli commit-stage-started
- name: Commit stage started
run: ezcd-cli commit-stage-started --project $PROJECT_ID --hash "${{ github.sha }}"
--author-name "${{ github.actor }}"
--author-email "${{ github.actor }}"
--message "${{ github.event.head_commit.message }}"
--date "${{ github.event.head_commit.timestamp }}"
- name: Test and build
run: ./your-test-and-build.sh
- name: Commit stage passed
run: ezcd-cli commit-stage-passed --project $PROJECT_ID --hash "${{ github.sha }}"
- name: Commit stage failed
if: !success()
run: ezcd-cli commit-stage-failed --project $PROJECT_ID --hash "${{ github.sha }}"
Other CI/CD Pipelines
# Install EZCD CLI
version=0.1.0
url=https://github.com/ezcdlabs/ezcd/releases/download/$version/ezcd_linux_amd64.tar.gz
curl -L -o ezcdcli.tar.gz $url
tar -xzf ezcdcli.tar.gz -C /usr/local/bin
chmod +x /usr/local/bin/ezcd-cli
4. Run the EZCD dashboard using Docker
docker run -d \
--name ezcd-dashboard \
-e EZCD_DATABASE_URL=postgres://username:password@hostname:port/dbname \
-p 3923:3923 \
ghcr.io/ezcdlabs/ezcd-server:latest