-
Notifications
You must be signed in to change notification settings - Fork 3
Bash: Continuous Delivery
For us, continuous delivery relates to utilizing:
- a source control system, such as [Git] (http://git-scm.com).
- a build system such as [Jenkins] (http://jenkins-ci.org).
- a resultant artifact repository such as [Bintray] (https://bintray.com).
In reality we are providing the "delivery team," "version control" and "build & unit test" portion of the [Continuous Delivery] (http://en.wikipedia.org/wiki/Continuous_delivery) process as follows:
- A developer works on a feature (likely in a branch) and when the feature is completed, merges the feature in and makes it available. In [Git] (http://git-scm.com), it'd be equivalent to pushing master out to remote as in:
git push origin master
- [Jenkins] (http://jenkins-ci.org) monitors the source control system and performs the following when a change is observed:
- Retrieves the latest version of the code base.
- Revs the appropriate versioning file. For [Maven] (http://maven.apache.org) that's the
pom.xml
and for RPM's, that's a spec file. More about respective versioning can be found below. - Build the source and "do the needful." This is the portion that you will be responsible to provide - this may include invoking [Maven] (http://maven.apache.org) and instructing it to run all tests or how to build using an RPM spec file. More about building will be found below.
- Commit the versioning file (now containing a rev'd version). For spec files, automatic logs of changes since the last rev are included in the
%changelog
section.` - Publish an artifact to a consumable repository such as [Bintray] (https://bintray.com).
If you are using [Jenkins] (http://jenkins-ci.org) at [OpenShift] (https://www.openshift.com), we provide the necessary plumbing so your work can be rev'd and pushed back out to [GitHub] (https://github.com/) or [Bintray] (https://bintray.com). Please note, we are assuming [Jenkins] (http://jenkins-ci.org) at [OpenShift] (https://www.openshift.com) and [Git] (http://git-scm.com) below. One can easily adapt our work to other [CI] (http://en.wikipedia.org/wiki/Continuous_integration) environments or non [OpenShift] (https://www.openshift.com).