简体   繁体   中英

Is there any possible way to delete stage history in GoAgent?

I am using GoCD for package deployment and I would like to know if there are any possible ways to delete the Stage History in GoAgent .

I am asking this because the stage label was increasing to some extent while we are testing the pipelines and because of this we could not get the exact count of automated deployment.

Can anyone let me know if I could remove all the stage history without causing any confusions to the process?

I haven't stumbled across an official way to delete Stage History, but I have found a "manual" way to accomplish this.


You'll need to rename your pipeline to have your stage history disappear. Now you'll notice that if you go into your pipeline administration, the ability to rename a pipeline is not allowed. Example:

不可编辑的管道名称

So to circumvent this, you can go into your config.xml found under the /go/admin/config_xml path. Here's an image of that area:

在GoCD中配置XML

From there if you edit your pipeline and rename it, all of your Stage History will be deleted.

If you're okay with the new pipeline name you're done. If you want to return to the original name, you'll likely have to delete the previously named pipeline directories, otherwise your history may come back (I say "likely", because I've never gone back to the original name before, so this part is theoretical ;)

The original-named pipeline directories are going to be under the following directory paths:

  • <path-to-go>/go-server/artifacts/pipelines/<old-pipeline-name>/*
  • <path-to-go>/go-server/artifacts/cache/<old-pipeline-name>/*
  • <path-to-go>/go-server/db/shine/rdf-files/<old-pipeline-name>/*

You ought to be able to delete those, and then rename your pipeline again back to your original name (obviously take proper backups and test before you delete those.)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM