Job pass email template fails to get right values
Hi,
I created a Job pass email template for a project. In this project, I am using .set command to set the value of an environment variable. The email template contains that variable, but it is not picking the latest value. I can see the value being set in the environment variable. Is there anything I can do to resolve this? Thanks Ankit |
5 answers
.set updates the master record of the environment and does not update the build's copy of the environment. To change the value for the current build, you will need to use .bset/.tset which modifies the build's copy of the environment.
|
.set updates the master record of the environment and does not update the build's copy of the environment. To change the value for the current build, you will need to use .bset/.tset which modifies the build's copy of the environment. I am with you on this... But, I have a situation in which my current project calls another project using .runwait command. That means that the called project runs as a separate job and as such if i want to use any updated variables from the called project in my current project, I need to use .set command and then in the subsequent step, I should load the environment again. Also, since the email is sent through BF on Job pass, I cannot load the environment for that step. Another question: In the Adaptor, we always use setenv which is analogous to .set. Is there anything which is similar to .bset which can be used in adaptors? Thanks Ankit |
.set updates the master record of the environment and does not update the build's copy of the environment. To change the value for the current build, you will need to use .bset/.tset which modifies the build's copy of the environment. I am with you on this... But, I have a situation in which my current project calls another project using .runwait command. That means that the called project runs as a separate job and as such if i want to use any updated variables from the called project in my current project, I need to use .set command and then in the subsequent step, I should load the environment again. Also, since the email is sent through BF on Job pass, I cannot load the environment for that step. Another question: In the Adaptor, we always use setenv which is analogous to .set. Is there anything which is similar to .bset which can be used in adaptors? Thanks Ankit Hi, When you use the setenv and do not specify a group name, it works like the .bset command. If you were to use setenv, not specify group name, and specify 'type="temp"', it sets up a temporary variable for the use of the adaptor logic only. Brent Ulbricht RTC Build Lead |
.set updates the master record of the environment and does not update the build's copy of the environment. To change the value for the current build, you will need to use .bset/.tset which modifies the build's copy of the environment. I am with you on this... But, I have a situation in which my current project calls another project using .runwait command. That means that the called project runs as a separate job and as such if i want to use any updated variables from the called project in my current project, I need to use .set command and then in the subsequent step, I should load the environment again. Also, since the email is sent through BF on Job pass, I cannot load the environment for that step. Another question: In the Adaptor, we always use setenv which is analogous to .set. Is there anything which is similar to .bset which can be used in adaptors? Thanks Ankit Hi, When you use the setenv and do not specify a group name, it works like the .bset command. If you were to use setenv, not specify group name, and specify 'type="temp"', it sets up a temporary variable for the use of the adaptor logic only. Brent Ulbricht RTC Build Lead Thanks a lot.. It would certainly help me..... Thanks again, Ankit |
.set updates the master record of the environment and does not update the build's copy of the environment. To change the value for the current build, you will need to use .bset/.tset which modifies the build's copy of the environment. I am with you on this... But, I have a situation in which my current project calls another project using .runwait command. That means that the called project runs as a separate job and as such if i want to use any updated variables from the called project in my current project, I need to use .set command and then in the subsequent step, I should load the environment again. Also, since the email is sent through BF on Job pass, I cannot load the environment for that step. Another question: In the Adaptor, we always use setenv which is analogous to .set. Is there anything which is similar to .bset which can be used in adaptors? Thanks Ankit Hi, When you use the setenv and do not specify a group name, it works like the .bset command. If you were to use setenv, not specify group name, and specify 'type="temp"', it sets up a temporary variable for the use of the adaptor logic only. Brent Ulbricht RTC Build Lead Thanks a lot.. It would certainly help me..... Thanks again, Ankit Hi, There are other issues coming up when sending emails. Scenario: I have a project which has a Job Pass and Job Fail email templates. This means that when the job passes, then an appropriate template is picked and an email is sent. I have one step which calls a library using .runwait command. A separate job runs and in one of the step in the called job, I am using .set command to change the value of a variable. This changes the master copy of the environment. I load this environment again on the subsequent steps in the parent job. In the email template, I use one of those environment variables which was set using .set command. On successful run of the parent project, an email is sent by the system. But, this email does not contain the updated value of the environment variable. How can I make sure that the environment variable picks the right value in the template. Thanks Ankit |
Your answer
Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.