You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
Next: Root
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
The Atlassian Community can help you and your team get more value out of Atlassian products and practices.
I am writing a powershell script to be called by the OEC. In the config.yml file, I see the globalArgs line, but I dont know if these are specified by me, or is there a set of acceptable terms. How are these arguments then accessed within my powershell script? Finally, is there anything I need to configure in the tool, on the OEC integration page?
Hi Connor,
Sorry for the delayed response, firstly I should mention that passing args is not the optimal way to pass data from OEC to the PowerShell scripts, rather use "globalFlags" to declare key value pairs that are passed to PowerShell as named parameters with corresponding values.
Here is an example of how to set 3 parameters in config.yml:
apiKey: xxxxx-xxxxxxxxxxxxx-xxxxxxxx-xxxxxxxx-xxxxxxx
baseUrl: https://api.opsgenie.com
logLevel: debug
globalFlags:
parameter1: value1
parameter2: value2
parameter3: value3
actionMappings:
...
...
Here is an example of how to use these parameters in PowerShell:
param([string]$payload,
[string]$apiKey,
[string]$opsgenieUrl,
[string]$logLevel,
[string]$parameter1,
[string]$parameter2,
[string]$parameter3
)
echo $parameter1
echo $parameter2
echo $parameter3
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.