aws / aws-codedeploy-agent

Host Agent for AWS CodeDeploy
https://aws.amazon.com/codedeploy
Apache License 2.0
329 stars 187 forks source link

auto-purge : deployment-root #35

Closed Poil closed 8 years ago

Poil commented 8 years ago

Hi,

Is there a native way to purge this directory ? If no how are you managing it ? (post-action or via logrotate or ... ?)

Best regards,

amartyag commented 8 years ago

Hi Poil, we maintain deployments in this directory in a hierarchical fashion: deployment-root -> deployment-group-id -> deployment-id The agent keeps last 5 deployments in the deployment-group-id folder, which also includes the last successful deployment.

You can look at this config value here: https://github.com/aws/aws-codedeploy-agent/blob/master/lib/instance_agent/plugins/codedeploy/command_executor.rb#L13

Just in case, the detailed explanation of the agent behavior is present here: http://docs.aws.amazon.com/codedeploy/latest/userguide/host-cleanup.html in deployment archive cleanup section

I hope that helps.

Thanks, Amartya

Poil commented 8 years ago

Thanks ! (I think it will be nice to allow to configure it)