【现象】:

使用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. Web标准:一、xhtml css基础知识

    说明:这些知识是我看<十天学会DIV+CSS教程完整版 完美整理+完整代码>这篇文章后记下来的一些内容,包括少部分不懂得地方去百度到的一些解释等,该文章的地址: http://wenku. ...

  2. 【MySQL报错】ERROR 1558 (HY000): Column count of mysql.user is wrong. Expected 43, found 39.

    原文参考:http://wuzhuti.cn/2348.html 之前在centos6.4系统安装的是自带的mysql 5.1版本,后来升级到了5.6版本,执行以下命令报错 在网上查找原因说说因为升级 ...

  3. unity3d-ngui UIScrollView 滚动方向与滚轮相反

    生成一个滚动面板之后发现滚轮向上滚,界面向下:滚轮向下界面向上.在编辑窗口里发现这个选项 本来是-2,修改成正数就可以了. http://ju.outofmemory.cn/entry/146754

  4. python之socket运用2

    今天实现在客户端和服务端之间进行持续的通信 客户端代码 import socket ip_port = ("127.0.0.1",3000) sk = socket.socket( ...

  5. K组翻转链表 · Reverse Nodes in k-Group

    [抄题]: 给你一个链表以及一个k,将这个链表从头指针开始每k个翻转一下.链表元素个数不是k的倍数,最后剩余的不用翻转. [思维问题]: [一句话思路]: // reverse head->n1 ...

  6. 关于weblogic报UnsatisfiedLinkError Native Library xxx.so already loaded

    一.场景 最近写的一个系统,在Tomcat测试完后说要改使用weblogic,于是在服务器上安装了weblogic,捣鼓了半天,一个个问题冒了出来,其中就有个比较麻烦的报错:UnsatisfiedLi ...

  7. XAMPP下apache部署网站,多个虚拟机(空间)配置

     之 前在 Mac 下一直使用 MAMP 搭建本地 php 环境,因为其强大的组合配置以及方便的 UI 操作.因为公司的电脑是 Windows 的,有时候需要搭建 php 环境来调试一些小东西方便自己 ...

  8. OC 和 swift 冒泡排序

    swift 版 var numbers = [17, 28, 36, 15, 39] print("排序前\(numbers)") for i in 0..<numbers. ...

  9. 18-从n个数中选m个

    #include <iostream>using namespace std; int f(int n, int m){        if(n < m)         //这个条 ...

  10. Hadoop新手学习指导

    对于我们新手入门学习hadoop大数据存储的朋友来说,首先了解一下云计算和云计算技术是有必要的.下面先是介绍云计算和云计算技术的:              云计算,是一种基于互联网的计算方式,通过这 ...