你好我正在用Jenkins创建一个管道,我有这个文件:
def CompleteGraphUri = "http://172.16.0.81:58080/blazegraph/namespace/replicate- mishel/sparql?context-uri=http://lod.eurohelp.es/dataset/parkings"
def RDFParkings = "shacl/parkings.ttl"
node { stage('Upload RDF to blazegraph') {
sh 'curl -X POST -H Content-Type:text/turtle --data-binary @' + RDFParkings + '' + CompleteGraphUri } }
我需要说明如下:
curl -X POST -H Content-Type:text / turtle --data-binary @ parkings.ttl “http://172.16.0.81:58080/blazegraph/namespace/replicate-mishel/sparql?context-uri=http://lod.eurohelp.es/dataset/parkings”
但是我得到了类似的东西:
curl -X POST -H Content-Type:text / turtle --data-binary @ parkings.ttl 'http://172.16.0.81:58080/blazegraph/namespace/replicate-mishel/sparql?context-uri=http://lod.eurohelp.es/dataset/parkings'
我需要双引号而不是单引号。你能救我吗?
感谢您的关注。
此致
答案 0 :(得分:1)
替换
sh 'curl -X POST -H Content-Type:text/turtle --data-binary @' + RDFParkings + '' + CompleteGraphUri
通过
sh 'curl -X POST -H Content-Type:text/turtle --data-binary @' + RDFParkings + ' "' + CompleteGraphUri + '"'