CA Harvest Software Change Manager Command Line Utilities

  • Slides: 14
Download presentation
CA Harvest Software Change Manager Command Line Utilities Overview September 2015

CA Harvest Software Change Manager Command Line Utilities Overview September 2015

Agenda § What are Command Line Utilities? § Why should developers, release managers, builders

Agenda § What are Command Line Utilities? § Why should developers, release managers, builders be interested? § Command Line Utilities Overview § Scripting § Q&A 2 © 2015 CA. ALL RIGHTS RESERVED.

What are command line utilities? Ø Developers who use open source version control tools

What are command line utilities? Ø Developers who use open source version control tools such as Subversion and Git will be comfortable with CLI’s Ø Allow you to perform almost any function in Harvest (and some you can’t perform in Harvest) Ø Parameter driven for flexibility Ø Consistent for ease of use Ø Well documented Ø Comprehensive 3 © 2015 CA. ALL RIGHTS RESERVED.

Who should be interested? Why? Ø CLI’s give you the ability to perform functions

Who should be interested? Why? Ø CLI’s give you the ability to perform functions outside of the Harvest workbench or plugins. This is useful for: Ø Automation Ø Communication with external applications, services, machines Ø Easing repetitive tasks Ø Ensuring accuracy Ø These functions can be useful for Developers, Builders, Release Managers, etc. for Ø easy checkouts/ins outside of their work area Ø Incremental builds/deployments Ø Dependency checking Ø Populating staging servers 4 © 2015 CA. ALL RIGHTS RESERVED.

CLI Overview Ø Can be used in internal Harvest User Defined Processes (UDP’s) Ø

CLI Overview Ø Can be used in internal Harvest User Defined Processes (UDP’s) Ø Can be used in externally scripted solutions via perl, etc. Ø Some Examples: Ø hco – Harvest checkout, hci – Harvest checkin Ø hcp – Harvest create package, hpp – Harvest promote package, hdp – Harvest demote package Ø hccmrg – Harvest concurrent merge Ø hdv - Harvest delete version, hri – Harvest remove item Ø All Harvest CLI’s have a similar format for usage Ø Command –switch “parameter” Ø All CLI’s are secure Ø You cannot run a process in a project that doesn’t already exist with the correct parameters Ø Example, you cannot run an hci with a concurrent checkout if the Checkout Process in Harvest doesn’t support it Ø You cannot avoid the security configured for the harvest processes 5 © 2015 CA. ALL RIGHTS RESERVED.

CLI Overview – Some examples Ø hap - Approve Package Ø The hap command

CLI Overview – Some examples Ø hap - Approve Package Ø The hap command executes the approval process specified on the command line, or the first approve process in the current context if no process name is specified. Ø Syntax Ø hap package_name 1 package_name 2. . . {-b name -en name -st name} [-v] [-pn name] [-c text] {-usr username -pw password} [-rej] [-prompt] [-i inputfile. txt | -di inputfile. txt] [-eh filename] [-o filename | – oa filename] [-arg] [-wts] [-h] Ø hap My_Package -b broker -en project -st Dev –usr wmccall –pw mypass –o log. txt Ø Notes: Ø Approval groups and security follow the groups/security in the Project process Ø If you have multiple approval processes, the first in the list is used, or use the –p variable 6 © 2015 CA. ALL RIGHTS RESERVED.

CLI Overview – Some examples Ø hci - Check In Ø The hci command

CLI Overview – Some examples Ø hci - Check In Ø The hci command executes the check in process specified on the command line or the first check in process in the current context if no process name is specified. Ø Syntax Ø hci filename {-b name -en name -st name -p name -vp path} {-usr username -pw password} [-v] [-pn name] [-ur] [-uk] [-ro] [-d] [-nd] [-de string] [-s filename | pattern] [-op option] [-bo] [-if option] [-dvp path] [-dcp path] [-rm name] [-rusr username] [-rpw password] [-prompt] [-i inputfile. txt | -di inputfile. txt] [-eh filename] [-er filename] [-o filename | –oa filename] [-arg] [-wts] [-h] Ø hci *. c -b broker -en project -st Dev –usr wmccall –pw mypass –vp “/Repo/dir 1/dir 2” –cp “c: dir 1dir 2 –uk –op pc Ø Notes: Ø Security in the Project process is enforced Ø If you have multiple checkin processes, the first in the list is used, or use the –p variable 7 © 2015 CA. ALL RIGHTS RESERVED.

CLI Overview – Some examples Ø hsync – Synchronize Directory from View Path Ø

CLI Overview – Some examples Ø hsync – Synchronize Directory from View Path Ø The hsync command updates a file system directory so it reflects updates to the contents of a Harvest view under a specified path. Ø Syntax Ø hsync {-b broker} {–en project} {-st state} {–vp viewpath} {-cp clientpath} {-usr username -pw password | eh filename | -prompt} [-pn processname] [-br | -sy] [-av |-fv] [-iv |–pl packagelist | -il itemlist | -ps | -pv] [-ss snapshotview ] [-bo |-to] [-rm name -rusr username -rpw password | -er encryptedpwfile] [-v] [-i inputfile | -di inputfile] [-o logfile | -oa logfile] [-wts] [-h] Ø hsync -b broker -en project -st Dev –usr wmccall –pw mypass –vp “/Repo/dir 1/dir 2” –cp “c: dir 1dir 2” –pl “Package 1, Package 2” Ø Notes: Ø As you can see, there is an option for an ecrypted password file (-er). This password file is created via another CLI, svrenc. Ø Return codes are well defined. 8 © 2015 CA. ALL RIGHTS RESERVED.

CLI Overview – Some examples Ø hppolset – Set Password Policy Ø The hppolset

CLI Overview – Some examples Ø hppolset – Set Password Policy Ø The hppolset sends an authentication synchronization request to the broker. For Harvest users that also exist on the external authentication server, synchronization refreshes the values of Real Name, Phone#, Phone Extension, Fax#, and Email. For Harvest users who do not exist on the external authentication server, the users are ignored and their properties not updated. th. Ø Syntax Ø hauthsync {-b name} {-usr username} {-pw password} [-v] [-prompt] [‑i inputfile. txt | -di inputfile. txt Ø hsync -b broker–usr wmccall –pw mypass –di inputfile. txt Ø Input File (policy file) Ø Insert all password policy rules into policy file Ø Includes specific user details (password change requirements, etc. ) 9 © 2015 CA. ALL RIGHTS RESERVED.

CLI Overview – Why use CLI’s? Ø Why use the Command Line when almost

CLI Overview – Why use CLI’s? Ø Why use the Command Line when almost all of the functions are available in the Workbench? Ø Developers like the command line. They can script up commonly performed functions and quickly run them from the command line. Ø Less mistakes. If you design your checkout process once, all your search parameters are correct from then on. Ø Running Post and Pre Linked UDP’s from the Workbench. An example would be post-linking a hccmrg (Concurrent Merge) to a Concurrent Development Check-in. Ø Develop your own custom Web-based interface into Harvest to call the functions. Have an ASP application run Command Line Utilities. Pass the variables required in the script from an ASP form. Ø Excellent documentation in the Command Line Reference Guide 10 © 2015 CA. ALL RIGHTS RESERVED.

CLI Overview – Why use CLI’s? Ø UDP Dialog Ø Name – In the

CLI Overview – Why use CLI’s? Ø UDP Dialog Ø Name – In the Name field, enter the name of the UDP Ø Program - In the Program field, enter the name of the executable file you want to run. Ø Type - To specify the location of the program to be executed, choose Client or Server. The default value is Client. Ø No Prompt – UDP will run without opening dialog window Ø Secure Input – Does not allow runtime overrides to Input field Ø Input - Many programs read input from the default input device. This field allows you to enter and edit text to be used as input to the program you have specified. 11 © 2015 CA. ALL RIGHTS RESERVED.

CLI Overview – Scripting Ø What’s your favo(u)rite language? Ø Ø Ø 12 Perl

CLI Overview – Scripting Ø What’s your favo(u)rite language? Ø Ø Ø 12 Perl VBScript Shell. Script Power. Script SQL is a big part of scripting (and, you can use hsql as part of it!) You can perform absolutely anything with CLI and scripting. © 2015 CA. ALL RIGHTS RESERVED.

CA Harvest CLI: Q + A

CA Harvest CLI: Q + A

Sridhar Gooni Principal Software Engineer Sridhar. Gooni@ca. com www. ca. com/Harvest

Sridhar Gooni Principal Software Engineer Sridhar. Gooni@ca. com www. ca. com/Harvest