json - bash使用带有jq的变量在文件json中添加属性
问题描述
这是代码:
pipeline {
agent any
stages {
stage('parse') {
steps {
script{
sh "jq -n ${params.name} ${params.version} >fichier.json"
}
}
}
}
}
这是输出错误:
jq:
error: test/0 is not defined at <top-level>, line 1:
test
jq: 1 compile error
ps:test是params name的返回
解决方案
推荐阅读
- mysql - 在mysql中使用大数据集随机化结果的最快方法
- python - Python从标签中获取文本
- vba - 在 Word 文档中查找特定字符串并超链接到位于 ActiveDocument.Path 中的 pdf
- node.js - 在急切加载中续集 afterFind 钩子
- sql - 不正确的语法 - SQL
- konvajs - 如何使用 Konva 绘制多样式文本?
- php - 如何在 php 中创建自定义运输 shopify 应用程序?
- c++ - 标记颜色匹配系统中未定义的颜色和不存在样本
- node.js - IIS 和节点并排在同一 Windows 服务器上
- angularjs - Angular bootstrap uib-typeahead