peopledoc.jenkins-api

novafloss.jenkins-api

安装 jenkins-python 并包含 ansible 绑定模块。

以下是可用的 API 命令的详尽列表:

- http://python-jenkins.readthedocs.io/en/latest/api.html

要求

依赖

没有,但我们建议您先在您的剧本中包含 FGtatsuro.python-requirements,以确保 pip 是最新的,并且 requests 的安装不会出错。

角色变量

示例剧本

包括如何使用您的角色的示例(例如,作为参数传入变量)对用户来说总是很好的:

- hosts: slave
  roles:
    - FGtatsuro.python-requirements
    - novafloss.jenkins-api
  tasks:
    - jenkins_credentials:
        jenkins_url: https://jenkins.mycompany.com/
        name: github-https
        cls: com.cloudbees.plugins.credentials.impl.UsernamePasswordCredentialsImpl
        args:
          - 允许 github https 克隆
          - 我的 github 令牌
          - 816a8c3f0130e8b3a83ac65a5e4d1f26e121863e
    - jenkins_api:
        jenkins_url: https://jenkins.mycompany.com/
        command: node_exists
        args:
          - node-1
      register: result
    - debug:
        var: result.node_exists

注意: jenkins-api 模块将 API 结果字典以命令名称作为键存储。例如,前一个任务的结果存储为 result.node_exists

版权

由 @PeopleDoc 和贡献者根据 BSD 许可证发布。

关于项目

Install jenkins-python + include ansible binding module

安装
ansible-galaxy install peopledoc.jenkins-api
许可证
Unknown
下载
75.1k
拥有者
Top-Notch HR Services to Employees. Faster.