Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Update to reflect Akraino's use of ci-mangement

The ci-management or releng/builder repos in an LF project consolidates the Jenkins jobs from project-specific VMs to a single Jenkins server. Each Git repo in every project has a view for their jobs on the main Jenkins server. The system utilizes Jenkins Job Builder for the creation and management of the Jenkins jobs.


Jenkins job project views.

Quick Start

This section provides details on how to create jobs for new projects with minimal steps. All users in need to create or contribute to new job types should read and understand this guide.

As a new project you will be mainly interested in getting your jobs to appear in the Jenkins server silo archiving it by creating a <project>.yaml in the releng/builder or ci-management project’s jjb directory.

Example for releng/builder projects:

...

.

...

Example for ci-management projects:

...

In similar matter, if your project name is “aaa/bbb” then create a new jjb/aaa-bbb directory by replacing all “/” with “-“.

Note

builder/jjb/global-jjb or ci-management/jjb/global-jjb are submodules of releng/builder or is a submodule of ci-management repositories which require a git submodule update --init or using –recursive with git clone to get them fetched.

...

The changes to these files get published in Gerrit and reviewed by the releng/builder or ci-management teams team for the LF project. After approvals, these Gerrits patches get merged and the jobs published in Jenkins.

...

This will push the jobs to Gerrit and your jobs will appear in Jenkins once the releng/builder or ci-management teams team has reviewed and merged your patch.

...

Projects requiring a specific build configuration can submit a change to the ci-management or releng reposrepo.

Refer to the Jenkins Configuration Merge section to understand how the configuration changes get merged.

...

At the end of a build the job ships logs to a Nexus logs repo and can be conveniently accessed via the https://logs.exampleakraino.org/ URL. The Job Build Description will contain the specific log server URL for a build log. Jobs triggered via Gerrit Trigger will have the URL to the logs left as a post build comment.

Example Jenkins Build Description:

Build logs: https://logs.opendaylightakraino.org/releng/vex-yul-odl-jenkins-1/distribution-check-carbon/167

...

  1. Set a virtualenv

    virtualenv jjb
    source jjb/bin/activate
    
  2. Install JJB

    pip install jenkins-job-builder==2.0.5
    

    Note

    If a requirements.txt exists in the repository with the recommended JJB version then, use the requirements file to install JJB by calling.

    # From the root of the ci-management or builder directory
    pip install -r jjb/requirements.txt
    

    To change the version of JJB specified by jjb/requirements.txt to install from the latest commit to the master branch of JJB’s Git repository:

    cat jjb/requirements.txt
    -e git+https://git.openstack.org/openstack-infra/jenkins-job-builder#egg=jenkins-job-builder
    
  3. Check JJB installation:

    jenkins-jobs --version
    

...

The Jenkins server is the home for all project’s Jenkins jobs. Most of the job configuration gets managed through code using JJB through the ci-management or releng/builder reposmanagement repo.

To access the Jenkins Production URL for any project use: https://jenkins.akraino.org

...