Seed Solution
Continuous Integration (CI) is a critical prerequisite of Continuous Delivery/Deployment (CD).
Create a Release Package
To allow the execution of the build and package (CI) process on the DevOps Engineers machine, CDAF is used for both loose coupling and standardisation. CDAF provides a variety of features which provide consistency, especially important and the number of pipelines grow and the team members move between both squads and value streams.
Install on Windows
To install to current directory, recommend placing in your home directory, or download latest zip.
. { iwr -useb https://cdaf.io/static/app/downloads/cdaf.ps1 } | iex
.\automation\provisioning\addPath.ps1 "$(pwd)\automation"
Exit your session and re-open to reload the path.
Install on Linux
To install for the local user, recommend placing in your home directory, or download latest tarball or zip.
curl -s https://cdaf.io/static/app/downloads/cdaf.sh | bash -
./automation/provisioning/addPath.sh "$(pwd)/automation"
Exit your session and re-open to reload the path.
Entry Points
CDAF providers 4 entry scripts for different purposes.
- ci : Build and Package only, i.e. Continuous Integration, mandatory argument is BUILDNUMBER
- cd : Release, i.e. Continuous Delivery or Deploy (depending on gating or not), mandatory argument is ENVIRONMENT
- cdEmulate : Executes ci and then cd, generates BUILDNUMBER if not supplied and uses configurable ENVIRONMENT
- entry : Executes ci and then cd, generates BUILDNUMBER if not supplied and uses configurable ENVIRONMENT(s)
Release Package Creation
With the focus being delivery, not development, the creation of a consistent, self contained release package is a core CDAF feature used for both component delivery and stand-up/tear-down capabilities. The output of the CDAF CI processs is a single release.ps1
file. See Self-extracting release article.
Property Translation
The transformation process converts the human readable .cm
files into computer friendly properties file for use in the CD process, i.e. release.ps1
. See Configuration Management, tokenisation and detokenisation documentation.
A key principle of the Continuous Delivery Automation Framework is loose coupling. This gives the automation developer the ability to run the automation process on their workstation, well before executing in the pipeline tooling. This principle should be retained where possible so that troubleshooting and feature development can be be bought closer to the developer.
a loosely coupled solution can allow migrating from one pipeline tool to another with minimal effort.
Seed your solution
To seed a new solution, the minimal requirement is a directory with a solution file CDAF.solution
mkdir .cdaf
Linux
echo "solutionName=mycoolproduct" > .cdaf/CDAF.solution
echo "artifactPrefix=0.1" >> .cdaf/CDAF.solution
Windows
Set-Content .\.cdaf\CDAF.solution "solutionName=mycoolproduct"
Add-Content .\.cdaf\CDAF.solution "artifactPrefix=0.1"
The minimum properties are the name of your solution, and the versioning prefix. The resulting artefact will have the build number appended to the release package, e.g. the first build will be 0.1.1, then 0.1.2 and so on.
solutionName=mycoolproduct
artifactPrefix=0.1
Continuous Integration (CI)
With CDAF installed on your path, you can now test the solution by running the Continuous Integration entry point
linux
ci.sh
windows
ci
Many things will happen, however the key observation is that a file called release.sh for linux or release.ps1 for windows will be produced, this is the build artefact that can be consumed by the Continuous Delivery (CD) stages.
Shift-Left & Fail-Fast
Now that you have the bare minimum, apply it to your CI/CD toolset immediately. We want to have a green pipeline from the start to trap any problems we may introduce in subsequent steps.