[JIRA] (JENKINS-50218) Conan init fails when using Artifactory plugin

22 views
Skip to first unread message

ovidiu.b13@gmail.com (JIRA)

unread,
Mar 16, 2018, 9:31:03 AM3/16/18
to jenkinsc...@googlegroups.com
Ovidiu-Florin Bogdan created an issue
 
Jenkins / Bug JENKINS-50218
Conan init fails when using Artifactory plugin
Issue Type: Bug Bug
Assignee: Eyal Ben Moshe
Components: artifactory-plugin
Created: 2018-03-16 13:30
Environment: Jenkins 2.89.4 (using Official jenkins/jenkins:2.89.4 docker image)
Artifactory plugin 2.15.0
Labels: plugin pipeline
Priority: Blocker Blocker
Reporter: Ovidiu-Florin Bogdan

When using the Artifactory plugin in a Jenkins pipeline, the job fails because the conan_log.log file is missing. I guess this is happening during the initialization of the conan client.

 

Pipeline:

pipeline {
  agent none
  stages {
    stage('Build') {
      parallel {
        stage('Build Linux') {
          agent {
            docker {
              image 'internalDockerImage'
              label 'linux'
            }

          }
          environment {
            CONAN_USER_HOME = "${env.WORKSPACE}/conan_home"
          }
          steps {
            script {
              def client = Artifactory.newConanClient()
              def server_name = client.remote.add server: server, repo: artifactory_repo

              client.run(command: "config install https://git-repo/conan-settings/archive/master.zip")
              client.run(command: "create --profile Linux-Release . ourteam/unstable")
              client.run(command: "create --profile Linux-Debug . ourteam/unstable")

              String command = "upload *@ourteam/unstable --all -r ${server_name} --confirm"
              def buildInfo = client.run(command: command)
              server.publishBuildInfo buildInfo
            }
          }
        }
      }
    }
  }
}

 

Error:

java.nio.file.NoSuchFileException: /var/jenkins_home/workspace/CI-demo-boost_master-JCEYKQTFB5BJIKRMZAZEQKX6CC2RSWQNRLGRCS3JEGATGQ7CMMJQ/conan_home/conan_log.log
	at sun.nio.fs.UnixException.translateToIOException(UnixException.java:86)
	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 hudson.FilePath$22.invoke(FilePath.java:1475)
	at hudson.FilePath$22.invoke(FilePath.java:1470)
	at hudson.FilePath.act(FilePath.java:997)
	at hudson.FilePath.act(FilePath.java:975)
	at hudson.FilePath.touch(FilePath.java:1470)
	at org.jfrog.hudson.pipeline.steps.conan.InitConanClientStep$Execution.getConanClient(InitConanClientStep.java:86)
	at org.jfrog.hudson.pipeline.steps.conan.InitConanClientStep$Execution.run(InitConanClientStep.java:61)
	at org.jfrog.hudson.pipeline.steps.conan.InitConanClientStep$Execution.run(InitConanClientStep.java:38)
	at org.jenkinsci.plugins.workflow.steps.AbstractSynchronousStepExecution.start(AbstractSynchronousStepExecution.java:42)
	at org.jenkinsci.plugins.workflow.cps.DSL.invokeStep(DSL.java:229)
	at org.jenkinsci.plugins.workflow.cps.DSL.invokeMethod(DSL.java:153)
	at org.jenkinsci.plugins.workflow.cps.CpsScript.invokeMethod(CpsScript.java:108)
	at org.jfrog.hudson.pipeline.dsl.ArtifactoryPipelineGlobal.newConanClient(ArtifactoryPipelineGlobal.java:137)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93)
	at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)
	at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1213)
	at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1022)
	at org.codehaus.groovy.runtime.callsite.PojoMetaClassSite.call(PojoMetaClassSite.java:47)
	at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48)
	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113)
	at org.kohsuke.groovy.sandbox.impl.Checker$1.call(Checker.java:157)
	at org.kohsuke.groovy.sandbox.GroovyInterceptor.onMethodCall(GroovyInterceptor.java:23)
	at org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.SandboxInterceptor.onMethodCall(SandboxInterceptor.java:133)
	at org.kohsuke.groovy.sandbox.impl.Checker$1.call(Checker.java:155)
	at org.kohsuke.groovy.sandbox.impl.Checker.checkedCall(Checker.java:159)
	at com.cloudbees.groovy.cps.sandbox.SandboxInvoker.methodCall(SandboxInvoker.java:17)
	at WorkflowScript.run(WorkflowScript:20)
	at ___cps.transform___(Native Method)
	at com.cloudbees.groovy.cps.impl.ContinuationGroup.methodCall(ContinuationGroup.java:57)
	at com.cloudbees.groovy.cps.impl.FunctionCallBlock$ContinuationImpl.dispatchOrArg(FunctionCallBlock.java:109)
	at com.cloudbees.groovy.cps.impl.FunctionCallBlock$ContinuationImpl.fixName(FunctionCallBlock.java:77)
	at sun.reflect.GeneratedMethodAccessor509.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at com.cloudbees.groovy.cps.impl.ContinuationPtr$ContinuationImpl.receive(ContinuationPtr.java:72)
	at com.cloudbees.groovy.cps.impl.ConstantBlock.eval(ConstantBlock.java:21)
	at com.cloudbees.groovy.cps.Next.step(Next.java:83)
	at com.cloudbees.groovy.cps.Continuable$1.call(Continuable.java:174)
	at com.cloudbees.groovy.cps.Continuable$1.call(Continuable.java:163)
	at org.codehaus.groovy.runtime.GroovyCategorySupport$ThreadCategoryInfo.use(GroovyCategorySupport.java:122)
	at org.codehaus.groovy.runtime.GroovyCategorySupport.use(GroovyCategorySupport.java:261)
	at com.cloudbees.groovy.cps.Continuable.run0(Continuable.java:163)
	at org.jenkinsci.plugins.workflow.cps.SandboxContinuable.access$001(SandboxContinuable.java:19)
	at org.jenkinsci.plugins.workflow.cps.SandboxContinuable$1.call(SandboxContinuable.java:35)
	at org.jenkinsci.plugins.workflow.cps.SandboxContinuable$1.call(SandboxContinuable.java:32)
	at org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.GroovySandbox.runInSandbox(GroovySandbox.java:108)
	at org.jenkinsci.plugins.workflow.cps.SandboxContinuable.run0(SandboxContinuable.java:32)
	at org.jenkinsci.plugins.workflow.cps.CpsThread.runNextChunk(CpsThread.java:174)
	at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.run(CpsThreadGroup.java:331)
	at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.access$200(CpsThreadGroup.java:82)
	at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$2.call(CpsThreadGroup.java:243)
	at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$2.call(CpsThreadGroup.java:231)
	at org.jenkinsci.plugins.workflow.cps.CpsVmExecutorService$2.call(CpsVmExecutorService.java:64)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at hudson.remoting.SingleLaneExecutorService$1.run(SingleLaneExecutorService.java:112)
	at jenkins.util.ContextResettingExecutorService$1.run(ContextResettingExecutorService.java:28)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
	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 java.lang.Thread.run(Thread.java:748)
Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v7.3.0#73011-sha1:3c73d0e)
Atlassian logo

ovidiu.b13@gmail.com (JIRA)

unread,
Mar 28, 2018, 7:01:01 AM3/28/18
to jenkinsc...@googlegroups.com
Ovidiu-Florin Bogdan commented on Bug JENKINS-50218
 
Re: Conan init fails when using Artifactory plugin

I've found that this particular error is happening only when the `CONAN_USER_HOME` env variable is set, or when the home is set via the `Artifactory.newConanClient()` `userHome` argument.

You MUST leave the `CONAN_USER_HOME` unset, and let the Artifactory plugin set it. Otherwise it blows.

ovidiu.b13@gmail.com (JIRA)

unread,
Mar 28, 2018, 7:02:01 AM3/28/18
to jenkinsc...@googlegroups.com
{{ I've found that this particular error is happening only when the ` * CONAN_USER_HOME ` env variable is set, or when the home is set via the ` * Artifactory.newConanClient() ` ` * _* userHome ` *_ argument. }}

You
* MUST * leave the ` * CONAN_USER_HOME ` * unset, and let the Artifactory plugin set it. Otherwise it blows.

jgsogo@gmail.com (JIRA)

unread,
Jul 30, 2019, 7:20:02 AM7/30/19
to jenkinsc...@googlegroups.com

Hi! I've just submitted a PR that could fix this issue: https://github.com/jfrog/jenkins-artifactory-plugin/pull/178. Thanks for the feedback!

This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)
Reply all
Reply to author
Forward
0 new messages