在gitlab上发布yaml文件中的curl数据
我试图使用curl从gitlab ci文件中使用slack api将一些数据发布到slack,但上面的代码给出了以下错误:在gitlab上发布yaml文件中的curl数据,curl,yaml,gitlab,Curl,Yaml,Gitlab,我试图使用curl从gitlab ci文件中使用slack api将一些数据发布到slack,但上面的代码给出了以下错误: - >- curl -X POST --data-urlencode "payload={\"channel\": \"#space-unit-tests\", \"username\": \"webhookbot\", \"text\": \"Total number of test cases = $((COUNT_TESTS+MA
- >-
curl
-X POST
--data-urlencode
"payload={\"channel\": \"#space-unit-tests\", \"username\": \"webhookbot\", \"text\": \"Total number of test cases = $((COUNT_TESTS+MAIN_COUNT)).\", \"icon_emoji\": \":ghost:\"}"
https://hooks.slack.com/services/...
我的多行卷曲命令有问题吗?我搜索了这里和谷歌,但没有发现curl多行命令有任何问题。在管道符号后添加curl命令,格式与我附加的格式相同。它正在使用Yaml代码
$ curl # collapsed multi-line command
curl: try 'curl --help' or 'curl --manual' for more information
ERROR: Job failed: exit code 1
这可能与
Script:
-|
curl -H 'Content-Type: application/json' -d '{"text": "Sample Test"}' "https://outlook.office.com/webhook/..."