遇一山,过一山,处处有风景;只要勇敢向前,一路尽是繁花盛开。 | (点击查看→)【测试干货】python/java自动化、持续集成、性能、测开、简历、笔试面试等

java.nio.file.AccessDeniedException: /home/jenkins/agent/workspace/gift/target/allure-results/testrun.json

企业级持续集成
    自动化框架:java + testng + httpclient + allure
    持续集成:git + gitlab + jenkins + pipeline + maven + harbor + docker + k8s

 

持续集成环境:jenkins使用k8s作为构建环境,也就是说:拉取代码--》mvn打包--》构建镜像--》新镜像发布到k8s--》拉取自动化测试代码--》自动化测试--》allure报告,这些步骤都是在k8s内jnlp或者其它容器中完成的

目前遇到的问题:allure报告这一步报如下的错,通过构建日志断定是没有执行allure generate

Also:   hudson.remoting.Channel$CallSiteStackTrace: Remote call to JNLP4-connect connection from 192.168.117.161/192.168.117.161:14015
		at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1784)
		at hudson.remoting.UserRequest$ExceptionResponse.retrieve(UserRequest.java:356)
		at hudson.remoting.Channel.call(Channel.java:1000)
		at hudson.FilePath.act(FilePath.java:1194)
		at hudson.FilePath.act(FilePath.java:1183)
		at ru.yandex.qatools.allure.jenkins.AllureReportPublisher.addTestRunInfo(AllureReportPublisher.java:399)
		at ru.yandex.qatools.allure.jenkins.AllureReportPublisher.prepareResults(AllureReportPublisher.java:390)
		at ru.yandex.qatools.allure.jenkins.AllureReportPublisher.perform(AllureReportPublisher.java:230)
		at jenkins.tasks.SimpleBuildStep.perform(SimpleBuildStep.java:123)
		at org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:101)
		at org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:71)
		at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution.lambda$start$0(SynchronousNonBlockingStepExecution.java:47)
		at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
		at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
		at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
		at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
		at java.base/java.lang.Thread.run(Thread.java:829)
java.nio.file.AccessDeniedException: /home/jenkins/agent/workspace/gift/target/allure-results/testrun.json
	at sun.nio.fs.UnixException.translateToIOException(UnixException.java:84)
	at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102)
	at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107)
	at sun.nio.fs.UnixFileSystemProvider.newByteChannel(UnixFileSystemProvider.java:214)
	at java.nio.file.spi.FileSystemProvider.newOutputStream(FileSystemProvider.java:434)
	at java.nio.file.Files.newOutputStream(Files.java:216)
	at java.nio.file.Files.newBufferedWriter(Files.java:2860)
	at ru.yandex.qatools.allure.jenkins.callables.AbstractAddInfo.invoke(AbstractAddInfo.java:26)
	at ru.yandex.qatools.allure.jenkins.callables.AbstractAddInfo.invoke(AbstractAddInfo.java:19)
	at hudson.FilePath$FileCallableWrapper.call(FilePath.java:3502)
	at hudson.remoting.UserRequest.perform(UserRequest.java:212)
	at hudson.remoting.UserRequest.perform(UserRequest.java:54)
	at hudson.remoting.Request$2.run(Request.java:369)
	at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at hudson.remoting.Engine$1.lambda$newThread$0(Engine.java:93)
	at java.lang.Thread.run(Thread.java:748)
Finished: FAILURE

 

posted @ 2022-09-22 22:24  全栈测试笔记  阅读(325)  评论(0编辑  收藏  举报
浏览器标题切换
浏览器标题切换end