将txt文件作为构建参数上传到jenkins构建作业 [英] Upload a txt file to jenkins build job as build parameter

查看:974
本文介绍了将txt文件作为构建参数上传到jenkins构建作业的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

需要一些帮助来了解将测试用例文件作为构建参数上传到Jenkins Build作业吗?

Need some help to know about uploading a test case file to Jenkins Build job as build parameter is it possible?

我知道以下选项

  1. 参数化构建,我们可以在运行时指定源代码路径
  2. 构建之前将文件复制到作业的工作空间中

但是这两个选项都必须提供我正在寻找的路径,在该选项中我们可以将文件上传到Jenkins构建作业(类似于将文件附加到电子邮件).

but both the options we have to give the path i am looking at option where we can upload files to Jenkins build job (similar to attaching files to email).

有可能吗?

推荐答案

配置文件提供程序插件增加了提供配置文件(即用于Maven,XML,groovy的settings.xml)的功能,自定义文件等)通过Jenkins UI加载,并将其复制到作业的工作空间."

Config File Provider Plugin for Jenkins "Adds the ability to provide configuration files (i.e., settings.xml for maven, XML, groovy, custom files, etc.) loaded through the Jenkins UI which will be copied to the job's workspace."

https://wiki.jenkins.io/display/JENKINS /Config + File + Provider + Plugin

在Jenkins 构建环境部分中,选中选项提供配置文件.

In the Jenkins Build Environment section check option Provide Configuration files.

然后,您可以在本地工作空间中使全局配置的文件可用.通过config-file-provider插件配置的所有文件都可用,并且可以被引用."

Then you can "Make globally configured files available in your local workspace. All files configured via the config-file-provider plugin are available and can be referenced."

这篇关于将txt文件作为构建参数上传到jenkins构建作业的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆