Release Automation

Expand all | Collapse all

Copy Multiple files with Copy Files action

  • 1.  Copy Multiple files with Copy Files action

    Posted Jun 09, 2017 12:48 PM
      |   view attached

    Hi,

    We have situation where need to copy multiple files from source server to target server and for every deployment the source and target path are get changed along with files names. We have created the design with Environment parameters where we can specify the all parameters respective to that deployment. But for every deployment we have to configure the 100+ parameter values and that is time consuming. Please find attached one sample deployment doc for more understanding. 

    We need help to how we can accommodate this situation with CA RA Tool to reduce the time of parameter configuration.

     

    Attachment(s)



  • 2.  Re: Copy Multiple files with Copy Files action

    Posted Jun 12, 2017 05:56 AM

    In what way do the source/target paths change per deployment?

     

    are all files treated as artifacts or do you have for example one zip file with all files in it but the target paths for each file is different on the server?

     

    the problem is, if there isn't any structure in this, where you can for example get the target path based on the filename or something like that, then it is really hard to find a good solution for your problem, as you need to have a mapping between file and target path. I would use a config file instead of environment parameters though, especially if the paths are the same through all environments.



  • 3.  Re: Copy Multiple files with Copy Files action

    Posted Jun 12, 2017 10:21 AM

    Hi Mike,

    Thanks much for your response. Here are the point,

     

    For each deployment the source and target path are different. so we need to update the parameter values for every deployment.

     

    Yes. all files treated as separate artifacts, no single zip file and every file is having different target path on server.

     

    Do you have any example Configuration file ?



  • 4.  Re: Copy Multiple files with Copy Files action

    Broadcom Employee
    Posted Jun 12, 2017 06:14 AM

    As pointed by Michael very correctly we need to find and streamline the path generation. However, I think we should consider below

    1: When you say source path changes? can you elaborate more on it? (I assume that you are using each artifacts in isolation and may be the cause of different source path)

    2: Target path changes? can you elaborate more on it?

     

    Some more input

    As you mentioned that you are using environment parameter, so I am assuming that for all target server within same ENV the path(source/target) remain consistent.

     

    I think you need to revisit and re-ideate to streamline your artifacts/file distribution.

     

    As Michael pointed without any consistency it will be difficult to find a proper solution to your problem.

     

    Regards,

    Saurabh



  • 5.  Re: Copy Multiple files with Copy Files action

    Posted Jun 12, 2017 10:26 AM

    Hi Saurabh,

     

    Thanks for reply. here are the answers for your question,

     

    1: When you say source path changes? can you elaborate more on it? (I assume that you are using each artifacts in isolation and may be the cause of different source path)

     

    Yes. Each file is isolated from other files so for each file source path is different in every deployment. however Source and target server are different but source path structure on  staging and target server is same

     

    e.g.

       Source path : \\MOCDTL034DP794D\wwwroot\

     

       Target path: \\MOCDTL01DP794D\wwwroot\

     

    2: Target path changes? can you elaborate more on it? - I am saying for every deployment parameter values changes.



  • 6.  Re: Copy Multiple files with Copy Files action

    Posted Jun 12, 2017 10:28 AM

    If one deployment have source and target part like

     

          Source path : \\MOCDTL034DP794D\wwwroot\

           Target path: \\MOCDTL01DP794D\wwwroot\

     

    Next deployment it will be different like,

     

          Source path : \\MOCDTL034DP794D\abcd\pqr

           Target path: \\MOCDTL01DP794D\abcd\pqr



  • 7.  Re: Copy Multiple files with Copy Files action

    Broadcom Employee
    Posted Jun 12, 2017 11:37 AM

    Hi,

     I looked at the above scenario and I need some more information to understand current process design. Please correct me if my understanding is wrong.

     

    1: From above it looks like for each deployment you are copying files from source machine to remote machines. May be by using copy from remote like actions?

     

    Have you looked at grouping all source files into artifacts and than distribute this artifact as a package. Then each src file can be copied to respective target path.

     

    Currently the challenge I see with above is we have matrix relationship between the src-target path.

     

    Regards,

    Saurabh



  • 8.  Re: Copy Multiple files with Copy Files action

    Posted Jun 12, 2017 12:52 PM

    Hi Saurabh,

     

    1: From above it looks like for each deployment you are copying files from source machine to remote machines. May be by using copy from remote like actions?

     

    Yes. We are copying files from Source machine using below action.The Source path are always shared drive with shared folders so we use "\\MOCDTL034DP794D\wwwroot\" path as a source path. mentioned in below snaps as well

     

     

    Have you looked at grouping all source files into artifacts and than distribute this artifact as a package. Then each src file can be copied to respective target path.

     

    Answer to this - We never care across this logic. if you think we can do this. please provide more details if possible.



  • 9.  Re: Copy Multiple files with Copy Files action

    Posted Jun 13, 2017 01:23 AM

    does anything even stay the same between releases?

     

    there is currently no way to achieve what you want, because there is no ancher that could be used for a dynamic set up of the paths. on top of that source and target paths changes.

     

    the only possible way I'm currently seeing that you have the same folder structure on the source share and on the target share. so instead of copy each file on its own, you copy the complete folder structure. this might work for you, as at least your example you provided looks like that (same root folder but different substructure per release but it is the same for source and target)



  • 10.  Re: Copy Multiple files with Copy Files action

    Broadcom Employee
    Posted Jun 13, 2017 09:49 AM

    Let's call the first deployment "ABC" that deploys with the src/target values pointing to:

    Source path : \\MOCDTL034DP794D\wwwroot\

    Target path: \\MOCDTL01DP794D\wwwroot\

     

    And let's call the second deployment "DEF" that deploys with src/target values pointing to:

    Source path : \\MOCDTL034DP794D\abcd\pqr

    Target path: \\MOCDTL01DP794D\abcd\pqr

     

    I assume both of these deployments are being deployed through the same RA Application. But are ABC and DEF deploying the same exact application (in the sense of MS Word and MS Excel are two different applications/programs)? If not then maybe separating them into unique RA Applications might help. 

     

    In either case, some other options you might consider is possibly:

    a. It seems like the Source and Target have some consistencies in that the path remains the same. So maybe you only need to provide that part once. The unique piece will be the source and target server (which can probably be separated into Server Types). 

    b. Maybe there are files you can search for to find where the files should be copied from (and to if the folder structure between source/target is not always the same).

     

    Cheers,

    Gregg



  • 11.  Re: Copy Multiple files with Copy Files action

    Posted Jun 13, 2017 02:52 PM

    Hi Gregg,

     

    Thanks for response. 

     

    The ABC and DEF are deploying through same application so can not go with separate application.  Also we have weekly deployment for the same application and in each deployment the source and target path values are keep changing. 



  • 12.  Re: Copy Multiple files with Copy Files action

    Posted Jun 14, 2017 01:09 AM

    if the folder structure on source and target is not the same, as Gregg and me pointed out to simply copy that, I don't see a way to automate a deployment that changes every time.



  • 13.  Re: Copy Multiple files with Copy Files action

    Broadcom Employee
    Posted Jun 14, 2017 09:42 AM

    I agree with Michael. 

     

    If you're looking to simplify deployments then it might mean changing things a bit (like possibly separating into separate applications - though i don't have enough details to just recommend this approach). You may want to reach out to our Services team to have them assess the situation. 

     

    Some of the details behind making this easier might involve understanding how the list of files to be deployed gets generated and either being given the files in a zipped artifact like Saurabh mentioned, a mapping of the files like Michael said (that you can read and process in an RA workflow), or maybe check with engineering to see if capturing the state of files between releases might be a reliable way to detect the changed files (maybe of certain file types) to identify which files should be deployed. 

     

    Making RA deployments easier can sometimes come down to working with other teams involved (like your applications engineering team) and identifying a process (new or existing) that RA can leverage. 



  • 14.  Re: Copy Multiple files with Copy Files action
    Best Answer

    Broadcom Employee
    Posted Jun 19, 2017 08:14 AM

    Hi,

     I hope above answer from Michael and Gregg would have helped you and directed in a correct direction where we may need to design of the process/release considering some suggestion made in this thread.

     

    Please let us know your view. In case if you still need more information please let us know.

     

    Regards,

    Saurabh