I'm using Blade Logic 18.104.22.1682.
I'm writing a Jython script to change the link of a deploy Job to a different package.
I'm using the unreleased command DeployJob : setDepotObjectKey
The script does not give an error, but the Deploy Job stays with the old BLPackage linked.
To debug this problem, I changed the script to just change the name of the job.
I can see it works in the script output.
(see script and results below)
However, the Deploy Job won't change its name.
Am I missing a "commit" command to save changes? or a database lock?
The code is:
newJobID = runBlcliCmd('DeployJob','getDBKeyByGroupAndName',['/RND/Tests', 'Test_Deploy_Job']).returnValue print newJobID print jli.run(['DeployJob', 'getName']).returnValue print jli.run(['DeployJob', 'setName', 'Hello World']).returnValue print jli.run(['DeployJob', 'getName']).returnValue
The output is:
" -- INFO: BLCLI ARGS - ['DeployJob', 'getDBKeyByGroupAndName', '/RND/Tests/Eyal/Package_Creation', 'Test_Deploy_Job'] DBKey:SJobModelKeyImpl:3685-3-2109615 Test_Deploy_Job None Hello World Exit Code 0 The job 'Create TinyOBS Deploy Process' has succeeded
yes, you need to save the deploy job object, do the set then to a DeployJob update at the end. w/ the performance commands I would run:
blcli_execute DeployJob findByDBKey <key>
blcli_execute Utility storeTargetObject job
blcli_execute DeployJob setName "some name"
blcli_execute Job update NAMED_OBJECT=job