Uploaded image for project: 'Bamboo Data Center'
  1. Bamboo Data Center
  2. BAM-13209

Bamboo SCP Task should create remote path

XMLWordPrintable

    • 1
    • 3
    • Our product teams collect and evaluate feedback from a number of different sources. To learn more about how we use customer feedback in the planning process, check out our new feature policy.

      SCP Task should check whether given Remote Path exists and create it if necessary. At this point it attempts to transfer file(s) to non-existant folder structure and fails.

      Example.

      Attempt 1: path fragment ".../1.1.18-SNAPSHOT-434/" doesn't exist yet. Fail.

      09-V-2013 16:07:28 	Starting task 'SCP Task' of type 'com.atlassian.bamboo.plugins.bamboo-scp-plugin:scptask'
      09-V-2013 16:07:28 	Uploading '/opt/atlassian/bamboo-home/xml-data/build-dir/myplan/myfile.jar'...
      09-V-2013 16:07:28 	Failed to upload file '/myfile.jar'
      09-V-2013 16:07:28 	net.schmizz.sshj.xfer.scp.SCPException: Remote SCP command had error: scp: /tmp/myproject/1.1.18-SNAPSHOT-434/: Is a directory
      09-V-2013 16:07:28 	        at net.schmizz.sshj.xfer.scp.SCPEngine.check(SCPEngine.java:90)
      09-V-2013 16:07:28 	        at net.schmizz.sshj.xfer.scp.SCPEngine.sendMessage(SCPEngine.java:154)
      09-V-2013 16:07:28 	        at net.schmizz.sshj.xfer.scp.SCPUploadClient.sendFile(SCPUploadClient.java:92)
      09-V-2013 16:07:28 	        at net.schmizz.sshj.xfer.scp.SCPUploadClient.process(SCPUploadClient.java:73)
      09-V-2013 16:07:28 	        at net.schmizz.sshj.xfer.scp.SCPUploadClient.startCopy(SCPUploadClient.java:65)
      09-V-2013 16:07:28 	        at net.schmizz.sshj.xfer.scp.SCPUploadClient.copy(SCPUploadClient.java:45)
      09-V-2013 16:07:28 	        at net.schmizz.sshj.xfer.scp.SCPFileTransfer.upload(SCPFileTransfer.java:52)
      09-V-2013 16:07:28 	        at com.atlassian.bamboo.plugins.scp.ScpTask.transferFiles(ScpTask.java:199)
      09-V-2013 16:07:28 	        at com.atlassian.bamboo.plugins.scp.ScpTask.execute(ScpTask.java:97)
      09-V-2013 16:07:28 	        at com.atlassian.bamboo.task.TaskExecutorImpl.executeTasks(TaskExecutorImpl.java:188)
      09-V-2013 16:07:28 	        at com.atlassian.bamboo.task.TaskExecutorImpl.execute(TaskExecutorImpl.java:94)
      09-V-2013 16:07:28 	        at com.atlassian.bamboo.build.pipeline.tasks.ExecuteBuildTask.call(ExecuteBuildTask.java:87)
      09-V-2013 16:07:28 	        at com.atlassian.bamboo.v2.build.agent.DefaultBuildAgent.build(DefaultBuildAgent.java:206)
      09-V-2013 16:07:28 	        at com.atlassian.bamboo.v2.build.agent.BuildAgentControllerImpl.waitAndPerformBuild(BuildAgentControllerImpl.java:103)
      09-V-2013 16:07:28 	        at com.atlassian.bamboo.v2.build.agent.DefaultBuildAgent$1.run(DefaultBuildAgent.java:111)
      09-V-2013 16:07:28 	        at com.atlassian.bamboo.build.pipeline.concurrent.NamedThreadFactory$2.run(NamedThreadFactory.java:52)
      09-V-2013 16:07:28 	        at java.lang.Thread.run(Thread.java:722)
      09-V-2013 16:07:28 	Copy Failed. Some files were not uploaded successfully.
      

      Attempt 2: path fragment ".../1.1.18-SNAPSHOT-434/" has been created manually. Success.

      09-V-2013 16:10:10 	Starting task 'SCP Task' of type 'com.atlassian.bamboo.plugins.bamboo-scp-plugin:scptask'
      09-V-2013 16:10:10 	Uploading '/opt/atlassian/bamboo-home/xml-data/build-dir/myplan/myfile.jar'...
      09-V-2013 16:10:10 	'/opt/atlassian/bamboo-home/xml-data/build-dir/myplan/myfile.jar' was uploaded successfully.
      

      This becomes an issue if you indend to use variables in Remote Path field, like I do. For instance:

      Remote Path = /tmp/${bamboo.repository.branch.name}/${bamboo.maven.version}-${bamboo.repository.revision.number}/ 

      Thanks for considering,
      Tomas

            Unassigned Unassigned
            c93b4126e101 Tomas Vala
            Votes:
            19 Vote for this issue
            Watchers:
            15 Start watching this issue

              Created:
              Updated: