Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(RFC) native types and providers #382

Merged
merged 30 commits into from
Oct 5, 2015

Conversation

jhoblitt
Copy link
Member

@jhoblitt jhoblitt commented Oct 2, 2015

This is a family of native types and providers with the aim of replacing direct usage of the cli jar via exec resources (E.g. jenkins::cli:exec). The principle motivation is to resolve the "chicken vs egg" problem that occurs between the cli jar and jenkins when enabling security. Similarly, it provides a mechanism to set the API token on a user account that can be used for the connection of swarm clients, which otherwise are unable to connect when using a security realm that does not use password (E.g. github-oauth). It should be relatively easy to extend these types to provide additional functionality, such as supporting additional credentials types.

No attempt has been made to integrate the new types into the existing classes and defined types. It should be possible to try them out in an essentially stand alone fashion against a running jenkins instance. Preliminary and extremely terse notes are in NATIVE_TYPES_AND_PROVIDERS.md.

Comments, feedback, and/or bug reports would be greatly welcomed.

Joshua Hoblitt and others added 30 commits October 2, 2015 13:33
* user_update() creates or updates a single user from JSON
* user_info_all() dumps all current users in JSON
This class provides configuration values to override defaults and fact data for
PuppetX::Jenkins::Provider::Clihelper based providers.
This class is used to lookup common configuration values by first looking for the desired key as parameter to the config class in the catalog, then checking for a prefixed fact, and falling back to hard coded defaults.
This is a base class for providers that need to interact with jenkins via the
puppet_helper.groovy script.
Wraps Puppet::Type::newtype and sets up the type level autorequires needed for PuppetX::Jenkins::Provider::Cli subclass providers.
Provides unundef() & undefize() methods for [un]munging data.
…_helper

* credentials_list_json() list all credentials in the `global` domain as
  a JSON document to the stdout
* credentials_update_json() modify an existing credentials specified by
  a JSON document passed via the stdin
* credentials_delete_id() remove a credentials by `id`
* job_enabled() print the job's state as either "true" or "false"
@jenkinsadmin
Copy link

Thank you for a pull request! Please check this document for how the Jenkins project handles pull requests

@rtyler rtyler added this to the 1.6.0 - Kato milestone Oct 5, 2015
@rtyler
Copy link

rtyler commented Oct 5, 2015

I think this is worth including. i'm not sure, past defaulting these behaviors, how to encourage their usage though

rtyler pushed a commit that referenced this pull request Oct 5, 2015
@rtyler rtyler merged commit 971194e into voxpupuli:master Oct 5, 2015
@jhoblitt
Copy link
Member Author

jhoblitt commented Oct 5, 2015

@rtyler I agree that advertising this will be difficult. Perhaps add a section to the README about experimental types?

There is a todo in my usage notes for known issues. In particular, I think there needs to be some discussion about the enabled param to jenkins::job as it may break idempotency by modifying the job's config.xml. The easiest thing to do would be to deprecate the param and make it a "no-op". Another option would be to ignore managing the job's config string when the parameter is set.

@jhoblitt jhoblitt deleted the feature/types_and_providers branch April 15, 2016 20:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants