【发布时间】:2019-01-30 08:10:33
【问题描述】:
目前在我的管道的自动化阶段,我看到以下错误:
newman run collections/something.postman_collection.json -k
错误:ENOENT:没有这样的文件或目录,打开 'collections/something.postman_collection.json'
来自管道的代码
代码:
stage('自动化') {
node('build') { def collectionName = 'collections/something.postman_collection.json' def postmanEnvName ='collections/somethingapi.postman_environment.json' def globalsname = 'collections/somethingglobals.postman_globals.json' docker.image('postman/newman_alpine33').inside("--entrypoint=''"){ sh "newman run $collectionName -k" } } }
关于可能是什么问题的任何想法,我尝试了一些不同的组合 例如
"newman run $collectionName"
“新人 $collectionName”
“newman /collections:/etc/newman run $collectionName”
docker.image('postman/newman_alpine33').inside("--entrypoint='' -v /collections:/etc/newman")
谢谢!
【问题讨论】:
-
collections/something.postman_collection.json是如何提供的?文件是否内置在 docker 镜像中? -
它是构建的一部分并被拉入 jenkins 工作区