Configure a continuous integration environment

Configure a continuous integration environmentΒΆ

Plugin integration requires a Continuous Integration (CI) for testing and deploying new changes.

To configure a continuous integration environment:

  1. Configure Gerrit integration:

    1. Create and configure a Launchpad user to votie as a third-party developer. See Third Party Testing.
    2. Add the username and public key for the Gerrit plugin configuration in Jenkins.
    3. Send an email to the openstack-dev mailing list and nominate your system for voting permissions.
  2. Prepare the development and testing environments:

    1. Create a repository as described in Repository workflow.
    2. Allocate enough plugin-specific testing labs.
    3. Install and configure plugin-specific hardware resources.
    4. Confiure testing labs. See the Fuel development documentation.
  3. Configure CI:

    1. Have your own CI server. This provides better versioning, collecting test-results, deduplicating the same jobs, easier configuration and managing.

    2. Use Jenkins with the Jenkins Job Builder plugin, which provides easy job management and storage configuration.

    3. Install the Jenkins Job Builder from Git as described below.

    4. Create a pre-commit-hook to check your code:

      # Save this script to <PROJECT>/.git/hooks/pre-review
        and make it executable
      set -e
      set -o pipefail
      find . -name '*.pp' | xargs -P1 -L1 puppet parser \
      validate --verbose
      find . -name '*.pp' | xargs -P1 -L1 puppet-lint \
        --fail-on-warnings \
        --with-context \
        --with-filename \
        --no-140chars-check \
        --no-variable_scope-check \
        --no-nested_classes_or_defines-check \
        --no-autoloader_layout-check \
        --no-class_inherits_from_params_class-check \
        --no-documentation-check \
        --no-arrow_alignment-check \
      find . -name '*.erb' | xargs -P1 -L1 -I '%' \
      erb -P -x -T '-' % | ruby -c
      fpb --check  ./

See also

Creative Commons Attribution 3.0 License

Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.