bash - 第 2 行的此处文档由文件结尾分隔(需要 `EOF_$$')
问题描述
下面是执行 shell 脚本的 Jenkins groovy 代码:
BUILD_FULL = sh (
script: '''
cat > manifest.yml << EOF_$$
---
applications:
- name: xyz-api
instances: 1
memory: 1G
EOF_$$
''',
returnStatus: true
) == 0
以下是错误:
line 9: warning: here-document at line 2 delimited by end-of-file (wanted `EOF_$$')
manifest.yml
显示为:
---
applications:
- name: xyz-api
instances: 1
memory: 1G
EOF_31892
代替
---
applications:
- name: xyz-api
instances: 1
memory: 1G
如何跟踪文件结尾?使用 Jenkins groovy
解决方案
推荐阅读
- python - 在 Synology NAS 上提供 Python CGI 文件
- nuxt.js - Nuxt.JS - 无法读取未定义的属性“已安装”
- python - pygame.error: File is not a Windows BMP file(问题延续)
- javascript - 通过 QR 阅读器填写表格/输入
- julia - 如何将 ArrayFire 图像转换为 Julia 图像?
- python - 谁能解释这种深度优先搜索的实现?
- java - Java 获取第二种泛型类型
- c++ - 如何在没有 IDE 的情况下使用不同的外部库运行 c++ 项目?[Ubuntu]
- ruby-on-rails - 在 Ruby 2.6.3 中合并 2 个哈希并创建第三个新哈希
- r - 如何在R中抓取多个页面