GithubHelp home page GithubHelp logo

rex-jenkins's Introduction

Rex Jenkins module

This module setup jenkins.

STATUS

  • This module is tested with Jenkins 2.
  • This module is for the current development branch (Rex 2)
  • This module is in development state

Tasks

setup

Call this task to install jenkins on your system.

Currently it doesn't installed it, only sets some global variables

Parameters

  • ensure - Default: latest
  • user, The username or uid of the jenkins user - Default: jenkins
  • group, The groupname or gid of the jenkins user's group - Default: jenkins
  • jenkins_path, The jenkins home directory.

Example

use Jenkins;

task "setup", sub {
  Jenkins::setup {
    user         => "tomcat",
    group        => "tomcat",
    jenkins_path => "/srv/jenkins",
  };
};

Resources

folder

Create a job folder. The folders are not created recursive.

Parameters

  • ensure - Default: present
  • config_template, If you want to use a special folder configuration template - Default: template("templates/jenkins/folder.config.xml")

Example

Jenkins::folder "Builds",
  ensure => "present";

Jenkins::folder "Builds/foo",
  ensure => "present";

job

Create a job.

Parameters

  • ensure - Default: present
  • string_parameters, If you need string parameters for your job - Default []
  • choice_parameters, If you need choice parameters for your job - Default []
  • git_repository, URL to your git repository.
  • git_build_branch, Which branch to build.
  • build_command, Shell command to build the job.
  • config_template, If you want to use a special folder configuration template - Default: template("templates/jenkins/job.config.xml")

Example

Jenkins::job "Build Tests/root/Ubuntu 14.04",
  ensure            => "present",
  string_parameters => [
  {
    name        => "REX_REPO",
    description => "",
    value       => "https://github.com/RexOps/Rex.git",
  },
  {
    name        => "REX_BRANCH",
    description => "",
    value       => "master",
  },
  {
    name        => "BUILD_BRANCH",
    description => "",
    value       => "*/master",
  },
  ],
  choice_parameters => [
  {
    name        => "rex_feature",
    description => "",
    list => [qw/0.42 0.51 0.53 0.54 0.55 0.57 1.0 1.1 1.2 1.3 1.4 1.5/],
  },
  ],
  git_repository   => "https://github.com/RexOps/rex-build.git",
  git_build_branch => '$BUILD_BRANCH',
  build_command    => './run.pl ami-49cb503a';

pipeline

Create a pipeline.

Parameters

  • ensure - Default: present
  • string_parameters, If you need string parameters for your job - Default []
  • choice_parameters, If you need choice parameters for your job - Default []
  • script, Pipeline groovy script.
  • config_template, If you want to use a special folder configuration template - Default: template("templates/jenkins/pipeline.config.xml")

Example

Jenkins::pipeline "Build Tests/root",
  ensure            => "present",
  string_parameters => [
  {
    name        => "REX_REPO",
    description => "",
    value       => "https://github.com/RexOps/Rex.git",
  },
  {
    name        => "REX_BRANCH",
    description => "",
    value       => "master",
  },
  {
    name        => "BUILD_BRANCH",
    description => "",
    value       => "*/master",
  },
  ],
  choice_parameters => [
  {
    name        => "rex_feature",
    description => "",
    list => [qw/0.42 0.51 0.53 0.54 0.55 0.57 1.0 1.1 1.2 1.3 1.4 1.5/],
  },
  ],
  script   => template("templates/pipeline.config.tpl", {
    some_special_var => "foo",
    some_other_var => "bar",
  }),

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.