Skip to content

Latest commit

 

History

History
151 lines (117 loc) · 4.65 KB

README.md

File metadata and controls

151 lines (117 loc) · 4.65 KB

jenkins_plugins Cookbook

Build Status Cookbook Version GitHub license

This cookbook is designed to add an LWRPs around interacting with Jenkins Plugins.

Requirements

  • Chef 12 or higher
  • Ruby 2.1 or higher

Dependencies

  • jenkins
  • maven
  • ssh

Plugins Available

  1. Workflow
  2. Maven
  3. Git
  4. Artifactory
  5. SSH Keys
  6. SSH Config

Resources

jenkins_plugins_workflow

The Workflow plugin suite attempts to make it possible to directly write that script, what people often call a workflow (sometimes abbreviated flow), while integrating with Jenkins features like slaves and publishers.

jenkins_plugins_workflow 'my-first-workflow-job' do
  script 'hello-world.groovy' # Required
  description '' # Optional
  sandbox false # Optional
  version '1.8' # Optional
  action :create
end

jenkins_plugins_maven

jenkins_plugins_maven 'M3'
  version ''
  maven_home ''
  action :install
end

jenkins_plugins_git

jenkins_plugins_git 'git' do
  install true
  install_system false
  global_name ''
  global_email ''
  create_account false
  home 'git'
  version ''
  client_version ''
end

jenkins_plugins_artifactory

jenkins_plugins_artifactory 'artifactory' do
  id '' # Required
  url '' # Required
  username ''
  password ''
  timeout 300
  bypass_proxy false
end

jenkins_plugins_ssh_key

This LWRP is slightly out of key with everything else. It is not configuring anything Jenkins specific, it is simply used to write a private ssh key. This is here to enable the git LWRP to work correctly when needing to authenticate against a repository.

jenkins_plugins_ssh 'name' do
  type 'rsa' # Optional - Can be ['rsa', 'dsa', 'ecdsa']
end

:add

This action will check for a key in the following format:

#{jenkins_home}/.ssh/id_#{key_type}_#{name}

If this key does not exist the LWRP will add it.

:update

This action will update the contents of the key file if they have changed.

:remove

This action will check for a key in the following format:

#{jenkins_home}/.ssh/id_#{key_type}_#{name}

If this key exists the LWRP will remove it.

jenkins_plugins_ssh_config

TODO

Development

Please see the Contributing and Issue Reporting Guidelines.

License & Authors

Copyright (C) 2017 Monkey Little

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.