Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,553,465
Community Members
 
Community Events
184
Community Groups

How do I use arguments in as script for the OEC

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?

1 answer

0 votes
Allen Barnard
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Sep 28, 2020

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

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PERMISSIONS LEVEL
Site Admin
TAGS
AUG Leaders

Atlassian Community Events