{"id":19251219,"url":"https://github.com/rexops/rex-jenkins","last_synced_at":"2026-01-04T17:02:17.103Z","repository":{"id":42407421,"uuid":"61935898","full_name":"RexOps/rex-jenkins","owner":"RexOps","description":"A module to manage jenkins","archived":false,"fork":false,"pushed_at":"2016-06-27T19:04:31.000Z","size":8,"stargazers_count":3,"open_issues_count":0,"forks_count":2,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-01-25T23:34:17.296Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Perl","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/RexOps.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-06-25T09:18:45.000Z","updated_at":"2019-04-02T14:57:10.000Z","dependencies_parsed_at":"2022-09-01T01:00:38.201Z","dependency_job_id":null,"html_url":"https://github.com/RexOps/rex-jenkins","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RexOps%2Frex-jenkins","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RexOps%2Frex-jenkins/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RexOps%2Frex-jenkins/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RexOps%2Frex-jenkins/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RexOps","download_url":"https://codeload.github.com/RexOps/rex-jenkins/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244728187,"owners_count":20500023,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-09T18:21:09.393Z","updated_at":"2026-01-04T17:02:12.082Z","avatar_url":"https://github.com/RexOps.png","language":"Perl","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Rex Jenkins module\n\nThis module setup jenkins.\n\n## STATUS\n\n* This module is tested with Jenkins 2.\n* This module is for the current development branch (Rex 2)\n* This module is in development state\n\n## Tasks\n\n### setup\n\nCall this task to install jenkins on your system.\n\n*Currently it doesn't installed it, only sets some global variables*\n\n#### Parameters\n\n* ensure - Default: latest\n* user, The username or uid of the jenkins user - Default: jenkins\n* group, The groupname or gid of the jenkins user's group - Default: jenkins\n* jenkins_path, The jenkins home directory.\n\n#### Example\n\n```perl\nuse Jenkins;\n\ntask \"setup\", sub {\n  Jenkins::setup {\n    user         =\u003e \"tomcat\",\n    group        =\u003e \"tomcat\",\n    jenkins_path =\u003e \"/srv/jenkins\",\n  };\n};\n```\n\n## Resources\n\n### folder\n\nCreate a job folder. The folders are **not** created recursive.\n\n#### Parameters\n\n* ensure - Default: present\n* config_template, If you want to use a special folder configuration template - Default: `template(\"templates/jenkins/folder.config.xml\")`\n\n\n#### Example\n\n```perl\nJenkins::folder \"Builds\",\n  ensure =\u003e \"present\";\n\nJenkins::folder \"Builds/foo\",\n  ensure =\u003e \"present\";\n```\n\n### job\n\nCreate a job.\n\n#### Parameters\n\n* ensure - Default: present\n* string_parameters, If you need string parameters for your job - Default `[]`\n* choice_parameters, If you need choice parameters for your job - Default `[]`\n* git_repository, URL to your git repository.\n* git_build_branch, Which branch to build.\n* build_command, Shell command to build the job.\n* config_template, If you want to use a special folder configuration template - Default: `template(\"templates/jenkins/job.config.xml\")`\n\n\n#### Example\n\n```perl\nJenkins::job \"Build Tests/root/Ubuntu 14.04\",\n  ensure            =\u003e \"present\",\n  string_parameters =\u003e [\n  {\n    name        =\u003e \"REX_REPO\",\n    description =\u003e \"\",\n    value       =\u003e \"https://github.com/RexOps/Rex.git\",\n  },\n  {\n    name        =\u003e \"REX_BRANCH\",\n    description =\u003e \"\",\n    value       =\u003e \"master\",\n  },\n  {\n    name        =\u003e \"BUILD_BRANCH\",\n    description =\u003e \"\",\n    value       =\u003e \"*/master\",\n  },\n  ],\n  choice_parameters =\u003e [\n  {\n    name        =\u003e \"rex_feature\",\n    description =\u003e \"\",\n    list =\u003e [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/],\n  },\n  ],\n  git_repository   =\u003e \"https://github.com/RexOps/rex-build.git\",\n  git_build_branch =\u003e '$BUILD_BRANCH',\n  build_command    =\u003e './run.pl ami-49cb503a';\n```\n\n### pipeline\n\nCreate a pipeline.\n\n#### Parameters\n\n* ensure - Default: present\n* string_parameters, If you need string parameters for your job - Default `[]`\n* choice_parameters, If you need choice parameters for your job - Default `[]`\n* script, Pipeline groovy script.\n* config_template, If you want to use a special folder configuration template - Default: `template(\"templates/jenkins/pipeline.config.xml\")`\n\n\n#### Example\n\n```perl\nJenkins::pipeline \"Build Tests/root\",\n  ensure            =\u003e \"present\",\n  string_parameters =\u003e [\n  {\n    name        =\u003e \"REX_REPO\",\n    description =\u003e \"\",\n    value       =\u003e \"https://github.com/RexOps/Rex.git\",\n  },\n  {\n    name        =\u003e \"REX_BRANCH\",\n    description =\u003e \"\",\n    value       =\u003e \"master\",\n  },\n  {\n    name        =\u003e \"BUILD_BRANCH\",\n    description =\u003e \"\",\n    value       =\u003e \"*/master\",\n  },\n  ],\n  choice_parameters =\u003e [\n  {\n    name        =\u003e \"rex_feature\",\n    description =\u003e \"\",\n    list =\u003e [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/],\n  },\n  ],\n  script   =\u003e template(\"templates/pipeline.config.tpl\", {\n    some_special_var =\u003e \"foo\",\n    some_other_var =\u003e \"bar\",\n  }),\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frexops%2Frex-jenkins","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frexops%2Frex-jenkins","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frexops%2Frex-jenkins/lists"}