reljicb
reljicb

Reputation: 91

UrbanCode Deploy parent request property not available unless another component process executed

I would like to set a property in a component process which is available from there on in all subsequent steps, in the rest of the current process and in all other processes that are called from there.

So, in a component process, I'm using Deploy Process plugin to set a value to a property, in the scope of the parent request. Here's the illustration:

Deploy Request
   Application Process: AppProcess1
      Install Component
         component name: Comp1
         component process: Comp1-Proc1

         Step 1: Set Process Request Property
            name: PROP_1
            value: val1
            process request id: ${p:parentRequest.id}

         Step 2: Shell
            Shell Script: echo ${p:PROP_1} --> Output: <empty-string>

         Step 3: Run Component Process
            component process: Comp1-Proc2

            Step 1: Shell
               Shell Script: echo ${p:PROP_1} --> Output: val1

         Step 4: Shell
            Shell Script: echo ${p:PROP_1} --> Output: val1

The problem is that the value is not available in the steps in the current process (Comp1-Proc1) when referenced with ${p:PROP_1}, unless another component process (Comp1-Proc2) is called, where the value is available, and then come back to first process, when the value becomes available, too.

Am I doing something wrong? Is this an expected behavior?

I'm using an on-premise UrbanCode Deploy - version 7.0.2.3.ifix01.1022337. I don't find anything in the official UCD documentation, nor in plugin doc which would explain the above behavior.

Upvotes: 0

Views: 679

Answers (1)

Ashwani Singh
Ashwani Singh

Reputation: 13

Try Set Property. Via this you can extend the scope of the property which you are setting. For eg

Application process 1

Step 1 - shell

Deploy Request
   Application Process: AppProcess1
      Install Component
         component name: Comp1
         component process: Comp1-Proc1
              Shell 1 - (here use Set Environment property)
      Install Component
         component name: Comp2
         component process: Comp2-Proc1
              Shell 1 - (here you can refer to it) ${p:YourEnvironmentName/YourPropertyname}

You just need to extend the scope of property to a higher level

Upvotes: 0

Related Questions