A shared artifact built on a remote agent on a unix based OS with a Windows Bamboo Server does not preserve the permissions as originally built when used in an Artifact download task on a deployment plan. This doesn't occur when for example your Bamboo Server and remote agent are both on unix systems.
- Windows Bamboo Server
- Remote Agent (Tested on OSX and Ubuntu)
- Create a new Project (i.e.: Support), Plan (i.e.: MyPlan), disable your local agents and connect your unix remote agent (or dedicate it to the plan)
- Add n "Script" task
As a result you would have something like this in the build-dir:
- Create an Artifact definition as per following:
- Go to "<bamboo-home>/artifacts" and run the following:
As a result you would have something like (doesn't look like the permissions are preserved here either):
- Create a deployment plan that runs on the same remote agent and consumes the artifact with an artifact download task
As a result you would have this in the deployment working dir of the agent (note the executable bit is set across all groups):
- Write a script job that will re-set the correct permissions / rsync the files to destination using --chmod option to set the permissions
- Tar everything up before creating the artifacts and then pass around a tarball rather than just pure artifacts.