How to copy artifacts generated by a build (php web app) to a directory on the same server?

We're using TeamCity 9 on Ubunutu system. I want to copy the the artifacts published in the build to a directory (defined in Apache config as virtual directory) so that our application would get deployed.
Currently, our artifacts are being published in

root/.BuildServer/system/artifacts/repo_name/build_name/some_number/some_hash_value
directory.
I want to copy it to, let's say,
\home\ubuntu\repo_name
directory.\

I'm currently doing this:
I've added this command in my build step.
`cp -R -f %teamcity.build.workingDir%/* /home/ubuntu/repo_name/`
Is it correct way?
It doesn't copy artifacts, but it copies the working directory, right now this might work as well.

How should I copy the artifacts?
`
1 comment
Comment actions Permalink

Hello,

The recommended way is to configure separate build configuration with artifact dependency on a build configuration that produces binaries that need to be deployed.
For more details please read How to Set up Deployment in TeamCity.

0

Please sign in to leave a comment.