0
Fork 0
mirror of https://github.com/project-zot/zot.git synced 2024-12-16 21:56:37 -05:00
zot/pkg/extensions
Andrei Aaron b5f27c5b50 RepoSummary has a new attribute NewestTag of type ImageSummary
ImageListWithLatestTag currently returns a list of ImageInfo objects.
It needs to return consistent results with the API used for Global search as the same information will be used by the UI in the same type or cards.
So we need to update RepoSummary to include the data which right now is present in ImageInfo, but missing from RepoSummary (information on the latest tag in that specific repo).
Will update return type of ImageListWithLatestTag in a later PR (issue tracked in a separate GH issue)

Closes #666

Signed-off-by: Andrei Aaron <andaaron@cisco.com>
2022-07-27 19:41:00 +03:00
..
config image level lint: enforce manifest mandatory annotations 2022-07-27 11:48:04 +03:00
lint image level lint: enforce manifest mandatory annotations 2022-07-27 11:48:04 +03:00
monitoring Manage builds with different combinations of extensions 2022-06-30 09:53:52 -07:00
scrub image level lint: enforce manifest mandatory annotations 2022-07-27 11:48:04 +03:00
search RepoSummary has a new attribute NewestTag of type ImageSummary 2022-07-27 19:41:00 +03:00
sync image level lint: enforce manifest mandatory annotations 2022-07-27 11:48:04 +03:00
_zot.md use zot as an extension name, ext as a component and search as a module 2022-05-24 19:12:40 -07:00
extension_metrics.go changed filenames in pkg/extensions 2022-07-26 16:56:20 +03:00
extension_metrics_disabled.go changed filenames in pkg/extensions 2022-07-26 16:56:20 +03:00
extension_scrub.go changed filenames in pkg/extensions 2022-07-26 16:56:20 +03:00
extension_scrub_disabled.go changed filenames in pkg/extensions 2022-07-26 16:56:20 +03:00
extension_search.go changed filenames in pkg/extensions 2022-07-26 16:56:20 +03:00
extension_search_disabled.go changed filenames in pkg/extensions 2022-07-26 16:56:20 +03:00
extension_sync.go changed filenames in pkg/extensions 2022-07-26 16:56:20 +03:00
extension_sync_disabled.go changed filenames in pkg/extensions 2022-07-26 16:56:20 +03:00
extensions_lint.go image level lint: enforce manifest mandatory annotations 2022-07-27 11:48:04 +03:00
extensions_lint_disabled.go image level lint: enforce manifest mandatory annotations 2022-07-27 11:48:04 +03:00
extensions_test.go Manage builds with different combinations of extensions 2022-06-30 09:53:52 -07:00
README.md Manage builds with different combinations of extensions 2022-06-30 09:53:52 -07:00

Adding new extensions

As new requirements come and build time extensions need to be added, there are a few things that you have to make sure are present before commiting :

  • files that should be included in the binary only with a specific extension must contain the following syntax at the beginning of the file :

//go:build sync will be added automatically by the linter, so only the second line is mandatory .

NOTE: the third line in the example should be blank, otherwise the build tag would be just another comment.

//go:build sync
// +build sync

package extensions
...................
  • when adding a new tag, specify the new order in which multiple tags should be used (bottom of this page)

  • for each and every new file that contains functions (functionalities) specific to an extension, one should create a corresponding file that must contain the exact same functions, but no functionalities included. This file must begin with an "anti-tag" (e.g. // +build !sync) which will include this file in binaries that don't include this extension ( in this example, the file won't be used in binaries that include sync extension ). See extension-sync-disabled.go for an example.

  • when a new extension comes out, the developer should also write some blackbox tests, where a binary that contains the new extension should be tested in a real usage scenario. See test/blackbox folder for multiple extensions examples.

  • newly added blackbox tests should have targets in Makefile. You should also add them as Github Workflows, in .github/workflows/ecosystem-tools.yaml

  • with every new extension, you should modify the EXTENSIONS variable in Makefile by adding the new extension. The EXTENSIONS variable represents all extensions and is used in Make targets that require them all (e.g make test).

  • the available extensions that can be used at the moment are: sync, scrub, metrics, search, ui_base . NOTE: When multiple extensions are used, they should be enlisted in the above presented order.