Search the Community
Showing results for tags 'powershell'.
-
Hi, I'm trying to set up an after-setselector trigger to run using a powershell script. And, I'm having trouble accessing the "environment variables". I've added the following to server.conf: <TriggerVariables> <TriggerVariable name="SERVER_TRIGGERS_PATH" value="c:\triggers\server" /> <TriggerVariable name="TRIGGERS_PATH" value="c:\triggers" /> </TriggerVariables> and I've added the following to client.conf: <TriggerVariables> <TriggerVariable name="CLIENT_TRIGGERS_PATH" value="c:\triggers\client" /> </TriggerVariables> In my powershell script I'm just trying to access the variables (based on what is in the trigger guide) and then printing them out by doing the following: [string] $spacePath = $Env:PLASTIC_WORKSPACE_PATH; [string] $spaceName = $Env:PLASTIC_WORKSPACE_NAME; [string] $wkspacePATH = $Env:WKSPACE_PATH; [string] $serverTrigger = $Env:SERVER_TRIGGERS_PATH; [string] $clientTrigger = $Env:CLIENT_TRIGGERS_PATH; [string] $triggerPath = $Env:TRIGGERS_PATH; [string] $plasticUser = $Env:PLASTIC_USER; [string] $plasticClientMachine = $Env:PLASTIC_CLIENTMACHINE; [string] $plasticPlasticServer = $Env:PLASTIC_SERVER; Add-Content $outputLocation "spacePath: $spacePath"; Add-Content $outputLocation "spaceName: $spaceName"; Add-Content $outputLocation "wkspacePATH: $wkspacePATH"; Add-Content $outputLocation "serverTrigger: $serverTrigger"; Add-Content $outputLocation "clientTrigger: $clientTrigger"; Add-Content $outputLocation "triggerPath: $triggerPath"; Add-Content $outputLocation "plasticUser: $plasticUser"; Add-Content $outputLocation "plasticPlasticServer: $plasticPlasticServer"; Add-Content $outputLocation "plasticClientMachine: $plasticClientMachine"; And in the output location this is what is returned: spacePath: c:\plastic\tests\triggers spaceName: Plastic.Tests wkspacePATH: serverTrigger: clientTrigger: triggerPath: plasticUser: misterhux plasticPlasticServer: localhost:8087 plasticClientMachine: 08THORP5520 So my question is, am I doing something wrong or does the trigger mechanism not actually set environment variables? Thank you.