The documentation only mentions one use of circleci-agent
, being circleci-agent step halt
[1].
Because this call is made of 2 params “step” and “halt”, I was wondering if any other values for those parameters were allowed.
Without any trace of documentation in the official website and this forum, I also inspected the Dockerfile but found not trace of it. I tried running a container from the images supposedly including it, but there are no functions nor binaries with this name.
My current guess is that it is injected as a docker volume by the CircleCI engine, so my only option is to run a job in ssh in order to debug it.
Being a very cumbersome operation, we should include somewhere a reference to this utility.
Cheers
[1] https://circleci.com/docs/2.0/configuration-reference/#ending-a-job-from-within-a-step
2 Likes
For the record, circleci-agent
is actually circleci-cli
[1] with another name.
With a dedicated Go module handling the step
method [2].
This is the better documentation I have found so far.
[1] https://github.com/CircleCI-Public/circleci-cli
[2] https://github.com/CircleCI-Public/circleci-cli/blob/c5d1aee86245d9600d532274097b0a1239b46f09/cmd/step.go
I only just saw this message, sorry for the late response.
circleci-agent
is the process which executes jobs in your container
circleci-cli
is the CLI which can be installed locally and in jobs to perform a variety of actions
In the past these used to be the same thing, but they were later split apart. To add to the confusion, they are often both executed using the name circleci
.
The circleci step ...
commands, and all circleci test ...
commands are handled by circleci-agent
. If you have circleci-cli
installed then it will pass those commands through.
If you don’t have circleci-cli
installed inside a job, then the circleci
command will be handled directly by circleci-agent
.
This isn’t an ideal situation, but it’s where we ended up after a series of changes over time while maintaining backwards compatibility of existing jobs.
Many thanks @glenjamin.circleci. Was I correct to read the “documentation” and possible actions for circleci-agent
from the code base of circleci-cli?
Or is the documentation just missing and will be added in the future?
1 Like