Skip to content
For the complete documentation index, see llms.txt. This page is also available as Markdown.

Install Devolutions CLI on build agents

Devolutions CLI needs no runtime and no service: extract the archive for your agent's platform, add its folder to the PATH, and the agent is ready. This page covers what's different on a build agent: picking the right archive, keeping jobs from sharing configuration, and cleaning up after a job.

Pick the archive for your agent

PLATFORM
ARCHITECTURE
COMMAND

Windows

x64, Arm64

devo.exe

macOS

x64, Arm64

devo

Linux

x64, Arm64

devo

Each platform and architecture has its own build, available as a .zip or a .tar.gz archive: use the one that matches the agent. The archive can contain other files next to devo, such as native libraries, so keep the extracted folder together.

Install it

mkdir -p "$HOME/devo"
tar -xzf <archive>.tar.gz -C "$HOME/devo"
export PATH="$HOME/devo:$PATH"
devo --help

Use any folder the job can write to.

Expand-Archive <archive>.zip -DestinationPath "$env:TEMP\devo" -Force
$env:PATH = "$env:TEMP\devo;$env:PATH"
devo --help

Replace $env:TEMP with any folder the job can write to.

Keep each job's configuration separate

Devolutions CLI saves your contexts, sign-in sessions, and the state of its background process in a configuration folder in the user's profile. On a build agent that runs jobs one after the other under the same account, every job would share that folder: one job could use a context another job created.

Set DEVO_CLI_CONFIG_HOME to a folder that belongs to the job, before the first devo command:

Every devo command of the job then uses that folder for its contexts and its background process, and other jobs don't see it.

Control the background process

The first devo command that needs your workspace starts a background process and leaves it running for the next commands. It's the same devo file, running under the job's user account. It doesn't keep your job's output open, so the step that started it can finish normally.

By default, the background process stops on its own after 60 minutes without requests. On a build agent, you usually want it gone sooner.

SETTING
WHAT IT DOES

DEVO_DAEMON_IDLE_TIMEOUT

How long the background process waits without requests before it stops, for example 30s, 5m, 1h, or 00:05:00. The default is 60 minutes. 0s turns the idle stop off. If Devolutions CLI can't read the value, the command that would start the background process fails with invalidParameterValue.

--daemon option or DEVO_DAEMON_MODE

auto (default): start the background process when needed. require: use one that's already running, never start one. never: don't contact it, so commands that need it fail.

--no-daemon-autostart option or DEVO_DAEMON_AUTOSTART

Don't start the background process automatically. Set the variable to 0, false, or no to turn automatic start off.

With require, or with automatic start turned off, start the process yourself at the beginning of the job:

Set environment variables that Devolutions CLI reads later, such as the variable that holds your application secret, before the first devo command. The background process reads its environment when it starts. See Sign in from a CI pipeline.

Clean up at the end of the job

Run these commands in a step that always runs, even when the job fails:

  • devo logout clears the stored authentication of the context.

  • devo daemon stop --wait stops the background process of this configuration folder and waits until it's gone. If none is running, it does nothing.

  • Delete the configuration folder last: devo daemon stop uses it to find the background process.

On build agents that are deleted after each job, such as containers or temporary virtual machines, cleanup isn't required, but it costs nothing.

Good to know

Next

Last updated

Was this helpful?