"readTree" has been implemented for the "GerritUrlReader". Gerrit have
a REST API's to download repo contents but there are a number of
limitations that makes it unusable.
This implementation works as follows:
* The project and branch is parsed from the url.
* The current revision is fetched from the Gerrit REST API.
* The revision string is used as "etag".
* If the etag has changed a temporary directory is created.
* The project is cloned to the temporary directory.
* The cloned content is read into a "Readable Stream".
* The temporary directory is removed.
* "readTree" returns a response using "fromTarArchive" as read from the
temporary directory.
Also added an option to specify the base "cloneUrl" has been added to the
gerrit integration config.
Signed-off-by: Niklas Aronsson <niklasar@axis.com>
The "plugin-catalog-backend-module-gerrit" exports an entity
provider for discovering catalog entities from Gerrit
repositories. The provider uses the "List Projects" API in Gerrit
to get a list of repositories and will automatically ingest all
"catalog-info.yaml" files stored in the root of the matching
projects.
Also added the "getGerritProjectsApiUrl" function to the Gerrit
integration. This returns the url to the "List Projects" API for
a given integration.
Signed-off-by: Niklas Aronsson <niklasar@axis.com>
Split `integrations.bitbucket` into `integrations.bitbucketCloud`
and `integrations.bitbucketServer`
while staying backwards compatible for now
(== `BitbucketIntegration` loads from the new configs, too, if the old is not used).
Relates-to: #9923
Signed-off-by: Patrick Jungermann <Patrick.Jungermann@gmail.com>
The `refreshClusters` method is now part of the
`KubernetesClustersSupplier` interface definition and also documented.
All existing cluster suppliers now implement it as well and the examples
in the docs and in the CHANGELOG have been adjusted.
Signed-off-by: Luna Stadler <luc@spreadshirt.net>
To make it possible to refresh Kubernetes clusters responsible all
places that used ClusterDetails[] before now use the
KubernetesClustersSupplier directly and call getClusters() on it. This
allows people to use implement custom KubernetesClustersSuppliers that
fetch the clusters from somewhere and refresh them using whatever
mechanism they might need.
Signed-off-by: Luna Stadler <luc@spreadshirt.net>
Add a new provider `AwsS3EntityProvider` as a replacement for the now deprecated
`AwsS3DiscoveryProcessor`.
The new provider will scan configured S3 buckets (with optional) prefix and
add `Location` entities for all discovered catalog files.
These `Location` entities will then be processed as usual.
At each execution, the provider will apply a full mutation, replacing all previous
entities with the new entities/state.
Relates-to: #10183
Signed-off-by: Patrick Jungermann <Patrick.Jungermann@gmail.com>