运行命令,并将其输出发送到jenkins外部作业。

jenkins-external的Python项目详细描述


jenkins-external

jenkins-external是一个python脚本,它生成一个命令,记录 其输出和退出代码,然后将此信息记录到詹金斯 在外部工作中。

目前,ssh是向jenkins发送输出的唯一受支持的方法。 因此,您必须转到configure global security→ssh服务器,然后 在固定端口上启用ssh服务器。

安装

pip install jenkins-external

用法

usage: jenkins-external [-h] [-d DISPLAY_NAME] [-s SSH_COMMAND]
                        [-x EXECUTABLE] [-q]
                        host port job command [args [args ...]]

Runs a command, and passes its output to Jenkins as an external job.

positional arguments:
  host                  Jenkins hostname (for Jenkins SSH server)
  port                  Jenkins SSH server port
  job                   Jenkins job name
  command               command to be run under this script
  args                  arguments to pass to the command

optional arguments:
  -h, --help            show this help message and exit
  -u USER, --user USER  Jenkins user to login as (using public key
                        authentication, default: your username)
  -d DISPLAY_NAME, --display-name DISPLAY_NAME
                        display name of the build
  -s SSH_COMMAND, --ssh-command SSH_COMMAND
                        ssh command
  -x EXECUTABLE, --executable EXECUTABLE
                        the executable to actually use
  -q, --no-job-id       do not print the job ID in the end

示例

# Sends 'Hello, World!' to a job called `my-job` on a Jenkins instance
# running on `jenkins.example.com`, whose SSH port is 12345.
jenkins-external jenkins.example.com 12345 my-job echo 'Hello, World!'

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
用户界面如何在JavaGUI中为按钮创建各种颜色?   使用MSCAPI的RSA密钥包装的java使用   java Spring数据Redis JedisConnectionException:意外的流结束   java饼图未显示预期输出   java hystrixCommand注释commandKey的用途是什么   windows java可以从cmd运行jar,但不能通过双击来运行   java在单击按钮时遍历XML节点   java试图使用日期(int,int,int)构造函数   带有Buildship 2子项目的java不作为项目依赖项链接   java jsonrpc4j:如何从服务器获取列表<SomeObject>?   用于Java应用程序的内存设置MaxDirectMemory和MaxHeapMemory   java如何从以下类型格式化日期   javayoutube。搜索列表搜索不返回任何内容   java My参数在方法中不起作用,因为泛型存在问题   java如何将Map<Key1Type,Val1Type>转换为Map<Key1Type,Val2Type>   JavaJUnit测试:测试用例的改进,测试数组列表的长度?   java如何在Android中解析带有属性值的xml数据?   使用Hibernate对枚举类型进行Java8bean验证