0

Similar to this issue but that is for Windows and there is no correct answer.

I want to do a simple deployment using Bamboo (cloud version). The idea is we checkout the data from a Bitbucket repository and then use SCP to publish content.

The problem is when SCP runs, I keep getting:

There were no files

I have set up our Bitbucket repo and Bamboo can connect fine. However, I'm not sure where Bamboo checks out the files? I didn't set up our Bamboo instance, so I found that in the config settings, the default path is:

/home/bamboo/bamboo-agent-home/xml-data/build-dir/

I would have thought this should be really straight forward. The repo gets checked out into /a/path/somewhere/ and SCP uploads from /a/path/somewhere. The problem is I don't know where the path is and I cannot find any documentation that tells me where it is.

Paul Roub
  • 36,322
  • 27
  • 84
  • 93
Mark Robson
  • 1,298
  • 3
  • 15
  • 40

2 Answers2

1

My previous experience with Bamboo SCP Task have shown that it does not work well with Windows SSH servers. I tried freeSSHd and SolarWinds SCP server and I could not connect to any of them through SCP Task. As a workaround I used Maven build task with the following ant-run configuration:

<configuration>
  <tasks>
    <scp todir="username:password@xxx.xxx.xxx.xxx:/" trust="true" failonerror="false">
      <fileset dir="dirname">
        <include name="**/*">
      </fileset>
    </scp>
  </tasks>
</configuration>

I had this task in a different Bamboo stage. To pass files (artifacts) from one stage to another:

  • click Create definition under the Artifacts tab in the first job configuration (which generates the files you wanna pass)
  • click Create dependency under the Artifacts tab in the seconds job configuration which runs previously mentioned ant-run task
Madis Pukkonen
  • 1,005
  • 11
  • 12
0

I think you want to use the SCP Task as one of the tasks (the final one) of your Deployment project. To use that task you'll need to share one or more artifacts that are produced by the associated Build project.

David
  • 5,184
  • 3
  • 41
  • 67