diff options
author | Cyril Jouve <jv.cyril@gmail.com> | 2019-10-06 16:19:28 +0200 |
---|---|---|
committer | Cyril Jouve <jv.cyril@gmail.com> | 2019-10-06 16:39:33 +0200 |
commit | eefceace2c2094ef41d3da2bf3c46a58a450dcba (patch) | |
tree | b9cc5f5f320d764107e937aac86703a51cadb46d /tools/reset_gitlab.py | |
parent | f5b4a113a298d33cb72f80c94d85bdfec3c4e149 (diff) | |
download | gitlab-eefceace2c2094ef41d3da2bf3c46a58a450dcba.tar.gz |
feat(ci): improve functionnal tests
Diffstat (limited to 'tools/reset_gitlab.py')
-rwxr-xr-x | tools/reset_gitlab.py | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/tools/reset_gitlab.py b/tools/reset_gitlab.py new file mode 100755 index 0000000..64668a9 --- /dev/null +++ b/tools/reset_gitlab.py @@ -0,0 +1,20 @@ +#!/usr/bin/env python + +import sys + +from gitlab import Gitlab + + +def main(): + with Gitlab.from_config(config_files=["/tmp/python-gitlab.cfg"]) as gl: + for project in gl.projects.list(): + project.delete() + for group in gl.groups.list(): + group.delete() + for user in gl.users.list(): + if user.username != "root": + user.delete() + + +if __name__ == "__main__": + sys.exit(main()) |