Just wanted to migrate an existing plugin of mine and move the setting variables into a environment key.
It seems like there is no way to use arrays in the environment section, or did I messed up the yaml format? -
YAML for plugin
- name: "PRComment"
image: *********.net/drone-prcomment:latest
settings:
GITEA_TOKEN:
from_secret: GITEA_TOKEN
VERBOSEMODE: true
CUSTOM_PIPELINE_STATE: true
READ_FILES:
- build/FileLinter-Results.log
- build/ScriptAnalyzer-Results.log
- build/Pester-Results.log
- build/FileLinter.log
when:
event:
include:
- pull_request
YAML for environment
- name: "PWSH PRComment"
image: **********.net/drone-psbuildimage:latest
failure: ignore
commands:
- pwsh -NonInteractive -c "& {Import-Module './src/DroneIO.psd1'; Send-PRComment}"
environment:
GITEA_TOKEN:
from_secret: GITEA_TOKEN
CUSTOM_PIPELINE_STATE: true
LOG_FILES:
- "build/FileLinter-Results.log"
- "build/ScriptAnalyzer-Results.log"
- "build/Pester-Results.log"
when:
event:
include:
- pull_request
The error points to the line LOG_FILES
. I’ve already tried to indent the array like this:
LOG_FILES:
- "build/FileLinter-Results.log"
- "build/ScriptAnalyzer-Results.log"
- "build/Pester-Results.log"
Both variants work if used in a settings block but not as environment variables. I really can’t see what I’m missing here