To get DB key of BLPackage you can use below BLCLI.
`blcli BlPackage getDBKeyByGroupAndName $PACKAGE_GROUP $PACKAGE_NAME`
The BLPackage has capability to run external command in-case it require.
Thanks & Regards,
You can use Jenkins , excute shell step to execute a blcli /bljython / any script which calls Blcli commands to run the same scripts which you are doing using the Bl console.
Look for BLCLI commands documentation and blython examples
You can also make use of Webservices to have a better integration
Hi, Just to clarify each step is running as a job. So would need to pass the package details which created in Step1.
When you are creating the Blpackage in Step 1 from Jenkins build, you must be using some variables to be used for the name of the blpackage and the location ?
Why cannot you use the same ones ?
Ideally, I would configure these as build paraemters in any build configuration, use the same ones to
- Create package in a specified location in BL
- Run Promotion ACL scripts/blcli
- Run blcli to move from one folder to another if required.
You can very well set NSH script Job parameters
if you can provide more details on the flow, the type of Jobs you are running, It may help.
Maybe you could completely avoid using the NSH script:
As DEV packages reside in /Depot/appname/DEV I assume, packages in stage SYSTEST reside in /Depot/appname/SYSTEST. You use a property to set the stage of your software. So I would recommend using a SmartGroup for DEV- and SYSTEST-depot groups which depends on this property. This way packages move automagically from DEV to SYSTEST after you changed the property value.
Package should be always static, and you can create multiple jobs by refering to one Package. So you would be having job per environment ( DEV,UAT and PROD).
Once development is finished, and want to carry out UAT, then lockdown the package and copy the job to UAT folder.
Run the ACL polociy job post to copy job.
Yes I can use the same build variable for promotion scripts.. Step1. does the following 1. checkout the file 2. Create the BLpackage.
For promoting, i am wondering how can i pass the Blpackage name ( I want pass as variable rather than hard code)to set the property value... Once i promote the package to SYSTEST, i can very well execute the job.
Thanks for your suggestion.
Yes packages are static. but jobs are dynamic. What we do is create a package in DEV and then use prmotion script to move the package to SYSTEST folder and create a SYSTES job and apply ACL etc..runnning the promotion script is within the bladelogic. I want to externalize those.. Now the challange is to get package details and pass the parameters..