mike-wendt / yaml-axis-plugin

Matrix project axis creation and exclusion plugin using yaml file (It's similar to .travis.yml)

Home Page:https://wiki.jenkins-ci.org/display/JENKINS/Yaml+Axis+Plugin

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Jenkins Yaml Axis Plugin

Matrix project axis creation and exclusion plugin using yaml file

Plugin Version Build Status

Usage

1. Add yaml file to repository

example

# axis.yml
RUBY_VERSION:
  - 2.1.8
  - 2.2.4
  - 2.3.0

exclude:
  - RUBY_VERSION: 2.1.8
  - RUBY_VERSION: 2.3.0
    DATABASE: oracle

2. Create Multi-configuration project

new_job

3. Configuration Axis

Choose Yaml Axis

Add axis

Input configurations

config

  • Axis yaml file : Yaml file path (relative path from workspace or absolute path)
  • Axis name : Top key in yaml file

You can combine Yaml Axis and other axes

4. Configuration Execution Strategy

Choose "Yaml matrix execution strategy" at Execution Strategy

strategy

If you don't want to exclusion, choose Classic

Input settings

Example 1 (Use yaml file)

yaml_file

Example 2 (Use yaml text)

yaml_text

4. Build job

Generate yaml based matrix and run job 💪

result

  • blue is executed job
  • gray is excluded(skipped) job

Detail

Excluding logic

Excluding pattern may be specified with List of Map (e.g. List<Map<String, String>>)

# axis.yml
exclude:
  - RUBY_VERSION: 2.1.8
  - RUBY_VERSION: 2.3.0
    DATABASE: oracle

When specified 2 axes

axis

This results in a 3x3 build matrix.

result

  • When specified RUBY_VERSION value 2.1.8, 3 results are excluded
    • RUBY_VERSION value 2.1.8 and DATABASE value mysql is excluded
    • RUBY_VERSION value 2.1.8 and DATABASE value postgres is excluded
    • RUBY_VERSION value 2.1.8 and DATABASE value oracle is excluded
  • When specified RUBY_VERSION value 2.3.0 and DATABASE value oracle, 1 result is excluded
    • RUBY_VERSION value 2.3.0 and DATABASE value oracle is excluded

About

Matrix project axis creation and exclusion plugin using yaml file (It's similar to .travis.yml)

https://wiki.jenkins-ci.org/display/JENKINS/Yaml+Axis+Plugin

License:MIT License


Languages

Language:Groovy 96.7%Language:HTML 3.3%