Harvest

  • 1.  How can I reserve components of a package using UDP and HCO?

    Posted Jul 31, 2017 11:41 AM

    A client requires that when passing from one state to another, the components of the package are automatically reserved, it would be correct to place the following:
    hco -ro -s "*.* "



  • 2.  Re: How can I reserve components of a package using UDP and HCO?
    Best Answer

    Broadcom Employee
    Posted Jul 31, 2017 04:06 PM

    Hello Carlos,

     

    There are 3 areas in the product documentation that will help us to answer this question:

     

    hco Command - Check-out
    https://docops.ca.com/ca-harvest-scm/13-0/en/command-reference/get-started-with-ca-harvest-scm-commands/hco-command-check-out


    Defie a User-Defined Process
    https://docops.ca.com/ca-harvest-scm/13-0/en/administrating/define-lifecycle-processes#DefineLifecycleProcesses-DefineaUser-DefinedProcess


    Use the System Variables
    https://docops.ca.com/ca-harvest-scm/13-0/en/administrating/use-the-system-variables

     

    What you will do is go into the properties of your Promote process and set up a post-linked UDP process that performs a Check out - Reserve Only command.  This will place "R" tags on the items in the package after they have been promoted to the next state.  In order to provide the correct details to the hco command you are going to use the Harvest "System Variables".  These will allow you to "pass in" the broker name, project name, state and package name, etc.

     

    Here is an example hco command that might accomplish what you are wanting to do:

    hco -b [broker] -en [project] -st [state] -vp "\MyRepositoryName" -p ["package"] -ro -usr [userid] -pw [password] -s "*.*" -to 

     

    (The items in the square brackets are the "System Variables".  Notice that there is not a system variable for the repository name.  You will need to provide that when you set up the UDP)

     

    Let me know if you need more information.



  • 3.  Re: How can I reserve components of a package using UDP and HCO?

    Posted Aug 02, 2017 12:40 AM

    Hello Melinda,

    Thanks for your help.
    The problem I have, is that when I use the hci command in the pre-linked and hco post-linked, the hco command gives me error, but if I just leave the hco command in the post-linked error.



  • 4.  Re: How can I reserve components of a package using UDP and HCO?

    Broadcom Employee
    Posted Aug 02, 2017 12:40 PM

    Can you let me know what error message you're getting?  And what hco command you are using?

     

    Thanks



  • 5.  Re: How can I reserve components of a package using UDP and HCO?

    Posted Aug 03, 2017 09:34 PM

    Hi Melinda,

    The error was by user permissions. Thank for your help.