Delete Pipelines in /var/lib/go-agent/pipelines

18 views
Skip to first unread message

Eric Frazier

unread,
Mar 3, 2022, 11:07:18 AM3/3/22
to go-cd
My system has limited amount of space and the pipelines that get stored here using most of it. Is there a way for the agent to clean up after itself inside this directory?

Ashwanth Kumar

unread,
Mar 3, 2022, 7:56:59 PM3/3/22
to go...@googlegroups.com
See if this is useful: https://gist.github.com/ashwanthkumar/9ba57d8cdfbcae956ba92a99ebf74bc4

In GoCD when an agent runs a pipeline / stage / job, that job has exclusive access to the agent. So we've a pipeline that is marked to run on all available agents once a day (generally when you know most agents are free, like a nightly job) and have a script that delete everything under the ${GO_AGENT_DIR}/pipelines except the current ${GO_PIPELINE_NAME} which is probably just a shell script anyways. Depending on how quickly your disk fills up, you can tweek how many times you want to run this pipeline in a given day.

Thanks,

On Thu, 3 Mar 2022 at 21:37, Eric Frazier <ejf...@gmail.com> wrote:
My system has limited amount of space and the pipelines that get stored here using most of it. Is there a way for the agent to clean up after itself inside this directory?

--
You received this message because you are subscribed to the Google Groups "go-cd" group.
To unsubscribe from this group and stop receiving emails from it, send an email to go-cd+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/go-cd/cdd110c4-4545-422a-8c75-f07b5167716dn%40googlegroups.com.


--

Ashwanth Kumar / ashwanthkumar.in

Reply all
Reply to author
Forward
0 new messages