How to pass in environment variables via job api

When creating a job using the API, it doesn’t seem to be possible to pass in environment variables, e.g., ENV_VAR=1 start-command

Resolved in a private thread.

When creating jobs for Docker services, the expected format is a bit different as we are using the Docker CMD: https://docs.docker.com/engine/reference/builder/#cmd.

We were able to get this working using the following format:

sh -c export ENV_VAR=value; start-command

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.