Open biolds opened 5 months ago
It's not implemented yet it seems. My proposal from https://github.com/woodpecker-ci/woodpecker/issues/3762 is:
Support a option
WOODPECKER_AGENT_ENV_FILE
that works like DRONE_RUNNER_ENV_FILE which can be mounted into the agent which would make the environment variables available to all pipelines.
Alternatively, it could possibly done in the agent config ui too.
it could possibly done in the agent config ui too
Sounds similar to https://github.com/woodpecker-ci/woodpecker/pull/3723, but for/per Agent.
Two approaches can be implemented at the same time:
Hello,
I'm trying to set per agent environment variables but could not find a way to do it. I want to use them to set ip addresses to access external resources that varies by agent. So far, I have tried without success:
--env=WOODPECKER_ENV_FILE=/etc/drone.conf
to docker, like it was done with Drone--env=WOODPECKER_ENVIRONMENT=extern_ip:1.2.3.4
, but this one is server only it seems--env=WOODPECKER_HOSTNAME=my_agent
, this variable is supported by Woodpecker, but it seems like it's not available from the pipelinesDid I miss a way to pass agent specific data to the steps, or a way to identify which worker is running the test ?
Thanks for your effort on this great software!
Suggested solution
Support one of the three way I tried.
Alternative
No response
Additional context
No response
Validations
next
version already [https://woodpecker-ci.org/faq#which-version-of-woodpecker-should-i-use]