Automic Continuous Delivery Automation

  • 1.  Setting up a parameter to grab version controlled packages

    Posted Apr 22, 2019 09:51 PM

    We are trying to setup a function which will view a folder path on another server and be able check the version and grab the oldest to process

     

    we are currently using Subversion for the code repository.

    We will have one part of the filename fixed, at the moment we are calling the file "full_release_" followed by the environment Letter (L,M,N...) and we are then aiming to have the date/time of the package (zip file) being built. I was aiming to do a move of the zip file to the deployment server/environment., to remove it from the directory for 2 reasons.

    1. to remove the file from the temp directory to stop filling up disk space

    2. to remove deployed packages If two builds happen close together, we are hoping to take the older one first. Ideally,

     

    I'd like to be an environment specific file instead of the file for all environments.

     

    i have setup a file list variable to view the file location the packages will be placed after a build but, with limited coding knowledge, i'm not sure how to identify the oldest file, for the environment, to continue the workflow.

     

    would anyone have an idea?

     

    thanks



  • 2.  RE: Setting up a parameter to grab version controlled packages

    Broadcom Employee
    Posted Jul 19, 2019 05:37 AM
    Hi Shane,

    if you want to better control the items in the variable it might be better to use the backend variable instead and run a command that would filter and sort for you, for example, on Linux you can run something like:
    ls -alt | grep full_release_L  |  tail -1
    to get the oldest file for environment L

    Regards,
    Varban