StackStorm / StackStorm/st2

Magic variables in yaml files

Open
#1,651 11 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

complexity:easy feature proposal status:under discussion
Dominant language
Python
Stars
6.5k
Forks
787
PR merge metrics
No merged PRs in 30d

Description

There are already some environment variables available to the actions.
Most probably there will be more and more useful of these during time.

The proposal is to make those variables available in yaml files too, bringing more flexibility.


---
name: example_action
runner_type: local-shell-cmd
entry_point: ""
enabled: true
parameters:
  cwd:
    default: "/opt/stackstorm/virtualenvs/{{ ST2_ACTION_PACK_NAME }}/bin"
    immutable: true
  cmd:
    ...

Btw, this approach is pretty obvious thing in Ansible, which operates with yaml files too.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the action environment-variable documentation in actions.html and the YAML action definition shown in the issue. Trace how those definitions are loaded and rendered, then verify that the documented action variables are available in YAML values and that existing action behavior remains unchanged.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
devops
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.