【现象】:

使用multi-line string parameter获取的文本变量,在jenkins shell里面显示为单行文本(空格分割)。

【问题】:能否转换为多行文本,并存入文件。

【解决方案】:

(假设多行文本变量名为:file_body;待写入文件的文件名变量为:file_name)

#!/usr/bin/python
import os
import io with io.open(os.getenv("file_name"), "w", encoding="utf-8") as text_file:
text_file.write("%s" % unicode(os.getenv("file_body")))

如何将Jenkins multiline string parameter的多行文本优雅的保存为文件的更多相关文章

  1. HTTP Status 400 - Required String parameter 'userName' is not present 错误

    HTTP Status 400 - Required String parameter 'userName' is not present 错误 先mark  有时间详细写 参考链接: https:/ ...

  2. required string parameter XXX is not present

    @RequestParam jQuery调用方式: deleteFile: function(filePath) { return ajax({ method: 'POST', url: '/cm/s ...

  3. [BTS] Error biztalk arguments null exception string reference not set to an instance of a string. parameter name

    biztalk arguments null exception string reference not set to an instance of a string. parameter name ...

  4. Jpa 报错 :HTTP Status 400 - Required String parameter 'xx' is not present

    一.问题描述 使用Springboot JPA 做分页查询,报错Required String parameter 'xx' is not present,后端未接受到请求 二.解决方案: 使用的请求 ...

  5. Required String parameter ' ' is not present

    Required String parameter ' ' is not present 报错原因: url中的参数错误. 解决方法: 1.修正url中的参数的值. 2.在Controller层中的@ ...

  6. 400错误,Required String parameter 'paramter' is not present

    1.就拿简单的登录来说吧,这是开始的代码 @RequestMapping(value="/login")public ModelAndView login(@RequestPara ...

  7. org.springframework.web.bind.MissingServletRequestParameterException: Required String parameter 'xxxx' is not present

    org.springframework.web.bind.MissingServletRequestParameterException: Required String parameter 'xxx ...

  8. 后台接收参数报错 Required String parameter 'id' is not present

    来自:https://blog.csdn.net/qq_15238647/article/details/81539287 关于ajax请求spring后台出现 Required String par ...

  9. required string parameter 'XXX'is not present 的几种情况

    required string parameter 'XXX'is not present 的几种情况 情况一:原因是由于头文件类型不对,可以在MediaType中选择合适的类型,例如GET和POST ...

随机推荐

  1. SSH框架整合的其它方式

    --------------------siwuxie095 SSH 框架整合的其它方式 1.主要是整合 Spring 框架和 Hibernate 框架时,可以不写 Hibernate 核心配置文件: ...

  2. UVa 1595 Symmetry(set)

    We call a figure made of points is left-right symmetric as it is possible to fold the sheet of paper ...

  3. php 账号不能同时登陆,当其它地方登陆时,当前账号失效

    解决的思路是每当用户登陆时我们必需记录当前的用户id和session_id,如果有人在其它地方用此账号登陆时,我们把此用户id对应的session_id的session文件删除,并重新记录当前的ses ...

  4. discuz的diy功能介绍

    可以通过页面操作的方式,完成页面布局设计,数据聚合,样式等常见的页面处理功能.   以管理员登陆discuz的前台时,会出现一个diy按钮. 流程,先设计框架,再完成数据的聚合.     定义模板时, ...

  5. Spring整合Struts2框架的第二种方式(Action由Spring框架来创建)(推荐大家来使用的)

    1. spring整合struts的基本操作见我的博文:https://www.cnblogs.com/wyhluckdog/p/10140588.html,这里面将spring与struts2框架整 ...

  6. Halcon对文件的创建、读取、写入、删除等操作总结

    Halcon可以操作普通文本文件,也可以操作二进制文件.如下图所示,只需要设置“FileType”参数的取值即可明确是操作文本文件还是二进制文件: 下面的程序是操作一个.txt文本文件的完整代码: * ...

  7. 怎么用js设置a标签点击链接改变当前颜色

    怎么用js设置a标签点击链接改变当前颜色 20 例如:多个a标签为白色,当点击其中一个a标签时改变那一个a标签的字体颜色为黄色,并且跳转到对应链接,当点击下一个a标签链接时,下一个为黄色,之前一个恢复 ...

  8. [PHP] 转义字符 Escape character

    \n is a symbol for new line \t is a symbol for tab and \r is for 'return'

  9. Linux系统 SecureCRT SecureFX 注册破解方法

    1.创建脚本文件crack-binary.sh,内容如下: #!/bin/sh        cd $1  cat SecureCRT  | od -A n -v -t x1 | tr -d ' \n ...

  10. Laravel Nginx 站点配置文件(Homestead)

    server {     listen 80;     listen 443 ssl http2;     server_name fmtmis.local;     root "/home ...