Skip to content

Commit ccbcb1e

Browse files
authored
Merge pull request #10587 from harness/dewan-ci17730
Add better explanation for plugin output variables.
2 parents e0c2d6a + 655eeb5 commit ccbcb1e

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

docs/continuous-integration/use-ci/use-drone-plugins/plugin-step-settings-reference.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,16 @@ For example, to write to the `DRONE_OUTPUT.env` file, the plugin must use a comm
7676
echo "VAR_NAME=somevalue" >> $DRONE_OUTPUT
7777
```
7878

79+
At runtime, the CI engine sets the `$DRONE_OUTPUT` environment variable to a temporary file path such as `/tmp/engine/xyz-output.env`. When a step appends `KEY=value` pairs to this file using `echo`, Harness CI automatically captures them as output variables. These can then be referenced in subsequent steps using expression syntax.
80+
81+
To verify that `$DRONE_OUTPUT` is set, you can run:
82+
83+
```
84+
echo $DRONE_OUTPUT
85+
```
86+
87+
This should return a path like `/tmp/engine/xyz-output.env`.
88+
7989
To reference the resulting output variable in another step in the same stage, use either of the following expressions:
8090

8191
```

0 commit comments

Comments
 (0)