File tree 3 files changed +77
-0
lines changed
3 files changed +77
-0
lines changed Original file line number Diff line number Diff line change @@ -34,6 +34,8 @@ API examples
34
34
gl_objects/pagesdomains
35
35
gl_objects/projects
36
36
gl_objects/runners
37
+ gl_objects/repositories
38
+ gl_objects/repository_tags
37
39
gl_objects/search
38
40
gl_objects/settings
39
41
gl_objects/snippets
Original file line number Diff line number Diff line change
1
+ #####################
2
+ Registry Repositories
3
+ #####################
4
+
5
+ References
6
+ ----------
7
+
8
+ * v4 API:
9
+
10
+ + :class: `gitlab.v4.objects.ProjectRegistryRepository `
11
+ + :class: `gitlab.v4.objects.ProjectRegistryRepositoryManager `
12
+ + :attr: `gitlab.v4.objects.Project.registries `
13
+
14
+ * Gitlab API: https://docs.gitlab.com/ce/api/container_registry.html
15
+
16
+ Examples
17
+ --------
18
+
19
+ Get the list of container registry repositories associated with the project::
20
+
21
+ registries = project.registries.list()
22
+
23
+ Delete repository::
24
+
25
+ project.registries.delete(id=x)
26
+ # or
27
+ registry = registries.pop()
28
+ registry.delete()
Original file line number Diff line number Diff line change
1
+ ########################
2
+ Registry Repository Tags
3
+ ########################
4
+
5
+ References
6
+ ----------
7
+
8
+ * v4 API:
9
+
10
+ + :class: `gitlab.v4.objects.ProjectRegistryTag `
11
+ + :class: `gitlab.v4.objects.ProjectRegistryTagManager `
12
+ + :attr: `gitlab.v4.objects.Repository.tags `
13
+
14
+ * Gitlab API: https://docs.gitlab.com/ce/api/container_registry.html
15
+
16
+ Examples
17
+ --------
18
+
19
+ Get the list of repository tags in given registry::
20
+
21
+ registries = project.registries.list()
22
+ registry = registries.pop()
23
+ tags = registry.tags.list()
24
+
25
+ Get specific tag::
26
+
27
+ registry.tags.get(id=tag_name)
28
+
29
+ Delete tag::
30
+
31
+ registry.tags.delete(id=tag_name)
32
+ # or
33
+ tag = registry.tags.get(id=tag_name)
34
+ tag.delete()
35
+
36
+ Delete tag in bulk::
37
+
38
+ registry.tags.delete_in_bulk(keep_n=1)
39
+ # or
40
+ registry.tags.delete_in_bulk(older_than="1m")
41
+ # or
42
+ registry.tags.delete_in_bulk(name_regex="v.+", keep_n=2)
43
+
44
+ .. note ::
45
+
46
+ Delete in bulk is asnychronous operation and may take a while.
47
+ Refer to: https://docs.gitlab.com/ce/api/container_registry.html#delete-repository-tags-in-bulk
You can’t perform that action at this time.
0 commit comments