问题
This is my first day using Travis CI. I made some mistakes, I've tried removing and adding the repository again, but Travis CI build history is still there, with broken links for old commits.
Any chance to remove those old builds?
回答1:
There's no way for the user to remove builds, but if you really want them removed I think your best bet is to email support (support@travis-ci.org) and ask them to remove it manually.
回答2:
You can use the travis
command line tool
Login first using travis login
then you can do the following
LAST_BUILD_NUMBER=68
for i in $(seq 1 $LAST_BUILD_NUMBER ); do travis logs $i --delete --force ; done
This will remove the "logs" so there's no information aside from the header and any confidential information will no longer be visible.
回答3:
Per https://twitter.com/travisci/status/557932883571392512
Since at least 2015/01/21 you can now delete [the log] from the web UI:
回答4:
Another way to PURGE EVERYTHING which results in:
- removing all the build history from Travis CI
- removing the repo from Travis CI
- removing the repo data from GitHub (all issues, PRs, wiki, everything)
- removing all the dangling commits from
git push -f
First make sure you have screenshots/backups/... of all your settings in Travis and in remote repository + that you have a 1to1 mirror of your remote repository (meaning ALL your branches properly downloaded to the local repo). That should be possible just with git clone
, git fetch
and maybe even git checkout
to each of the branches, so that you have all the history available locally (correct me if I forget some step).
Then you want to go to your remote server e.g. GitHub and delete the repository (Settings
- Danger Zone
- Delete this repository
). All your issues, PRs, wikis, any settings are gone now. Then create the same-named repository on GitHub again (do NOT! initialize it with anything, no license, no readme, no nothing).
Now all the dangling commits which would be cleaned locally via git gc
are gone from the remote repo (stealthy GitHub links begone!). Anything that should be the bare repo.git
folder should be overwritten (unless GitHub isn't doing something silly).
Proceed and go to Travis CI profile:
https://travis-ci.org/profile/<username>
Press Sync account
under My account
and check the Travis repo. All the settings and build history should be gone now too.
Now either remove the GitHub repo and resync again or proceed with the restoring:
git push -u origin <branch name> # repeat for each branch
Go to your settings backups (e.g. screenshots) and set everything the way it was before.
回答5:
As henrikhodne, build deletion is not possible.
From https://github.com/travis-ci/travis-ci/issues/877 (mirror) where the issue was raised:
Closing this issue for good, as this isn't on the roadmap for the near future. (Jul 23, 2015)
回答6:
You can click on the Remove log button

来源:https://stackoverflow.com/questions/13886218/remove-travis-ci-old-builds