QA/Automation/Projects/Mozmill Automation/On Demand Test Framework/CI Documentation

From MozillaWiki
Jump to navigation Jump to search

NOTE

This is a work in progress and should be more detailed soon

Overview

Master Responsibilities

  • Come up with a build environment artifact
    • Centralized on master to limit dependencies
    • Master itself is configured as a build node specifically to do these envs
  • Create core jobs on itself via Jenkins API
    • Grabs from davehunt's github repo
    • Uses python-jenkins to update the jobs on itself
    • Will leave old jobs behind if a platform is removed from requirements
  • Run the job cascade from the configuration file via the on-demand job
  • Push jobs to slaves

Slave Responsibilities

  • Pull build env artifact from master
    • Copy Artifact plugin
  • Run the test jobs (mozmill scripts)
  • Mozmill scripts push to brasstacks (slaves need network visibility to results repo)
  • Currently one build executor per node because no simultaneous mozmill. New focus monitor changes gives us a shot at parallelism

Flow

  • Standalone env build
    1. We kick off an environment build job on master
    2. Master contacts itself as a build node
    3. Master builds environment in place
    4. Now available as an artifact
  • Test job
    1. We kick off on-demand job on master w/ configuration file
    2. Configuration job used to create a new specific job w/ UUID in name
    3. New specific job has build triggers in it for each configuration to trigger parameterized core jobs. Immediately finishes after kicking all these off.
    4. Core jobs added to build queue and processed as nodes come available
    5. Core jobs have a dependencies on environments. Use artifacts as built above.
    6. Core jobs each translate to one run of the mozmill scripts.

Environment Targets

  • Retrieve them from a known place
  • Poll for newer environments and fetch on demand

Build Targets

Test Responsibilities

Installation

Install Prerequisites

Instructions

  1. Install and run Jenkins (java -jar jenkins.war)
  2. Open http://localhost:8080
  3. Install the following plugins (Manage Jenkins > Manage Plugins)
    • Mercurial Plugin
    • Green Balls
    • Xvnc (for Linux slaves)
    • Parameterized Trigger
    • GitHub
    • Git
    • Show Build Parameters
    • Rebuild

Configuration

Master

SSH login

  1. Generate public/private keys using RSA
  2. Keep the public key

Jenkins

  1. # of executors to 1

Windows Slave

Jenkins

  1. # of executors to 1

Linux, OS X Slave

SSH login

  1. Create activated_keys with master's public key

Jenkins

  1. # of executors to 1

Creating jobs

Mozmill Environments

Core Testrun Jobs

Trigger On-Demand Job

== Running test suites

On-demand test suite

Daily test suite

Proof of Concepts

Selenium

Mozmill

Questions/Proposals

  1. A plugin like the following could help us to prepare the workspace for testruns across slaves of the same platform. Downloads will not have to happen in parallel by the slaves but will all be done by the "master" and handed over to the slaves
  2. Do we want to place the master's Jenkins folder under the home directory of the user? Therefore we should work with the .war file instead of installing a native jenkins build onto the system?
  3. Do we have a fallback strategy if something is broken? Could we still trigger/execute tests manually for a given platform.
  4. For environment targets: Unzipping vs downloading without packing. Which is more complicated?