Skip to content

Build overview

Sam Gleske edited this page Feb 22, 2015 · 18 revisions

This document is a brief outline of the Jervis build overview. Travis CI also outlines a build overview.

Build overview

This documentation outlines the execution order of a build. This general process happens no matter what language is being built.

Note: encrypted secrets were decrypted when the job was generated.

  1. Clone the repository and cd to it.
  2. Decrypt encrypted files.
  3. Clean up any private keys used for decryption (i.e. removing gpg private keys from the build agent, etc.).
  4. Matrix building toolchains (i.e. set up the environment for the build like what version of python or ruby, etc). This is the first time user configured code is executed from the .jervis.yml. Setting up the matrix exclusions happen here as well.
  5. Perform the build lifecycles in the following order. Any one of the following steps can be overridden by the .jervis.yml.
  6. before_install - commands that run before the install step. e.g. point rubygems at an internal gem caching proxy such as geminabox or Nexus.
  7. install - commands that run to assemble dependencies.
  8. before_script - commands that prepare your system for testing. e.g. populate a database.
  9. script - commands to run unit tests.
  10. after_success or after_failure - Execute commands depending on the outcome of the build. (provided by the Post-Build Script Jenkins Plug-in).
  11. after_script - Always execute these commands after the build.

Sample yaml files

Here is a sample .jervis.yml yaml file with all of the build lifecycles (non-matrix build) executing only a single command at each step.

language: python
before_install: some command
install: some command
before_script: some command
script: some command
after_success: some command
after_failure: some command
after_script: some command

Here is a sample .jervis.yml with some of the build lifecycles (non-matrix build) executing multiple commands.

language: java
before_install:
  - some command
  - some command
before_script:
  - some command
  - some command
after_script:
  - some command
  - some command

Encrypted secrets

To learn more about securing data in your repository for the build process please see secure secrets in repositories.

Matrix builds

To learn more about matrix builds see matrix job support.