- Notifications
You must be signed in to change notification settings - Fork673
registry api implementation#759
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Merged
Uh oh!
There was an error while loading.Please reload this page.
Merged
Changes fromall commits
Commits
Show all changes
7 commits Select commitHold shift + click to select a range
910c286
merged new release & registry apis
kkoralsky340cd37
fix repository_id marshaling in cli
kkoralsky0b79ce9
register cli action for delete_in_bulk
kkoralsky3cede7b
fix docstring & improve coding style
kkoralsky4d31b9c
documentation
kkoralskyc91230e
whitespaces
kkoralsky2d9078e
documentation fix
kkoralskyFile filter
Filter by extension
Conversations
Failed to load comments.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Jump to file
Failed to load files.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
There are no files selected for viewing
2 changes: 2 additions & 0 deletionsdocs/api-objects.rst
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletionsdocs/gl_objects/repositories.rst
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
##################### | ||
Registry Repositories | ||
##################### | ||
References | ||
---------- | ||
* v4 API: | ||
+ :class:`gitlab.v4.objects.ProjectRegistryRepository` | ||
+ :class:`gitlab.v4.objects.ProjectRegistryRepositoryManager` | ||
+ :attr:`gitlab.v4.objects.Project.repositories` | ||
* Gitlab API: https://docs.gitlab.com/ce/api/container_registry.html | ||
Examples | ||
-------- | ||
Get the list of container registry repositories associated with the project:: | ||
repositories = project.repositories.list() | ||
Delete repository:: | ||
project.repositories.delete(id=x) | ||
# or | ||
repository = repositories.pop() | ||
repository.delete() |
47 changes: 47 additions & 0 deletionsdocs/gl_objects/repository_tags.rst
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
######################## | ||
Registry Repository Tags | ||
######################## | ||
References | ||
---------- | ||
* v4 API: | ||
+ :class:`gitlab.v4.objects.ProjectRegistryTag` | ||
+ :class:`gitlab.v4.objects.ProjectRegistryTagManager` | ||
+ :attr:`gitlab.v4.objects.Repository.tags` | ||
* Gitlab API: https://docs.gitlab.com/ce/api/container_registry.html | ||
Examples | ||
-------- | ||
Get the list of repository tags in given registry:: | ||
repositories = project.repositories.list() | ||
repository = repositories.pop() | ||
tags = repository.tags.list() | ||
Get specific tag:: | ||
repository.tags.get(id=tag_name) | ||
Delete tag:: | ||
repository.tags.delete(id=tag_name) | ||
# or | ||
tag = repository.tags.get(id=tag_name) | ||
tag.delete() | ||
Delete tag in bulk:: | ||
repository.tags.delete_in_bulk(keep_n=1) | ||
# or | ||
repository.tags.delete_in_bulk(older_than="1m") | ||
# or | ||
repository.tags.delete_in_bulk(name_regex="v.+", keep_n=2) | ||
.. note:: | ||
Delete in bulk is asnychronous operation and may take a while. | ||
Refer to: https://docs.gitlab.com/ce/api/container_registry.html#delete-repository-tags-in-bulk |
44 changes: 44 additions & 0 deletionsgitlab/v4/objects.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.