Skip to main content
When several CI jobs run on one machine under the same user account, they share the Orka CLI’s local configuration. Jobs that write it at the same time can break each other, and the failures look random. Giving each job its own configuration directory prevents this.

What the CLI keeps on disk

The Orka CLI keeps its state in two files under $HOME:
  • ~/.config/configstore/orka-cli.json holds the Orka API URL, set by orka config set --api-url.
  • ~/.kube/config holds the cluster connection and token, set by orka login or orka user set-token.
Almost every orka command reads orka-cli.json, and orka config set rewrites it in place. If one job reads the file while another is rewriting it, the reading job gets an empty or partial file and fails with:
The failure is intermittent and a retry usually passes, so it’s easy to mistake for a network problem. Retrying doesn’t fix it, though: nearly any orka command in any job can hit it, including the delete at the end of a job. Jobs that use different clusters or service accounts have a second problem. The CLI stores one Orka connection in ~/.kube/config, so the last job to run orka user set-token decides which token every job on the machine uses.

Give each job its own HOME for the Orka CLI

Point HOME at a directory of the job’s own, for orka commands only:
Each job now has its own orka-cli.json and ~/.kube/config, and the directory is removed when the job exits. Change HOME for orka only, not for the whole job. SSH agents, Git, cloud CLIs, and CI hooks keep their own files under HOME and expect the real one. If your CI runs later steps or hooks in child shells, export the function so they inherit it:
export -f works in bash only. In other shells, put the same one-line wrapper in a script on the job’s PATH ahead of the real orka binary.

When you need this

  • Several CI agents or executors on one machine under one user account, such as multiple Buildkite agents, a GitLab Runner with the shell executor and concurrent above 1, or a Jenkins agent with more than one executor.
  • Jobs on one machine that talk to different Orka clusters or use different service accounts.
Jobs that already run in their own container or VM each have their own HOME and aren’t affected.