Commit Graph

291 Commits

Author SHA1 Message Date
github-actions[bot] 64a03bd946 Version Packages 2022-05-17 09:26:29 +00:00
Antonio Musolino e295ce87de feat: allow repositories with nested namespace
Signed-off-by: Antonio Musolino <antoniomusolino007@gmail.com>
2022-05-11 11:51:59 +02:00
github-actions[bot] c02ce52da1 Version Packages (next) 2022-05-10 08:00:04 +00:00
github-actions[bot] 55da880bf9 Version Packages (next) 2022-05-03 09:38:51 +00:00
github-actions[bot] 1bff70d602 Version Packages (next) 2022-04-26 12:22:43 +00:00
Niklas Aronsson 6673babab9 GerritUrlReader: Implemented "readTree"
"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>
2022-04-22 14:52:02 +02:00
Johan Haals 3feeeef3b6 Merge pull request #10669 from anicke/gerrit-entity-provider
New plugin: "plugin-catalog-backend-module-gerrit"
2022-04-21 14:20:23 +02:00
Niklas Aronsson 566407bf8a New plugin: "plugin-catalog-backend-module-gerrit"
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>
2022-04-21 07:33:40 +02:00
Patrick Jungermann 1b4e1e2306 feat: split integrations.bitbucket -> bitbucketCloud / bitbucketServer
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>
2022-04-19 19:20:55 +02:00
github-actions[bot] 3f7acfb96e Version Packages 2022-04-19 14:28:08 +00:00
github-actions[bot] 2e1cce5528 Version Packages (next) 2022-04-12 15:19:00 +00:00
Emma Indal d26e1b0146 [TechDocs Addons] Give Feedback Addon (#10733)
* give feedback addon implementation

Co-authored-by: Camila Belo <camilaibs@gmail.com>
Co-authored-by: Anders Näsman <andersn@spotify.com>
Signed-off-by: Emma Indal <emma.indahl@gmail.com>

* export replaceUrlType from @backstage/integration-reacte

Co-authored-by: Camila Belo <camilaibs@gmail.com>
Co-authored-by: Anders Näsman <andersn@spotify.com>
Signed-off-by: Emma Indal <emma.indahl@gmail.com>

* export give feedback addon

Signed-off-by: Emma Indal <emma.indahl@gmail.com>

* add hooks used for give feedback addon

Co-authored-by: Camila Belo <camilaibs@gmail.com>
Co-authored-by: Anders Näsman <andersn@spotify.com>
Signed-off-by: Emma Indal <emma.indahl@gmail.com>

* replaceUrlType -> replaceGitLabUrlType

Signed-off-by: Emma Indal <emma.indahl@gmail.com>

* clarify template + template builder types

Signed-off-by: Emma Indal <emma.indahl@gmail.com>

* feedback fixups

Signed-off-by: Emma Indal <emma.indahl@gmail.com>

Co-authored-by: Camila Belo <camilaibs@gmail.com>
Co-authored-by: Anders Näsman <andersn@spotify.com>
2022-04-11 08:55:54 +02:00
github-actions[bot] e6f3fb8575 Version Packages (next) 2022-03-29 08:42:22 +00:00
Fredrik Adelöw 1d587f7bb7 fix the allow entries that should be lists
Signed-off-by: Fredrik Adelöw <freben@gmail.com>
2022-03-29 09:52:33 +02:00
Fredrik Adelöw 1691c6c5c2 Make User and Group not default allowed by rules
Signed-off-by: Fredrik Adelöw <freben@gmail.com>
2022-03-28 17:04:50 +02:00
Niklas Aronsson b7436743cb GerritUrlReader added that implements "readUrl"
The url used by "readUrl" is supposed to be human friendly url that can
be opened in the browser. This makes the Gerrit configuration a bit more
complicated since there is no built in support to browse a git in Gerrit.
Instead this is handled by separate services that can be deployed at a
different host then the Gerrit instance. This implementation supports
Gitiles as the code browser tool. The dependency to Gitiles is optional,
it is perfectly possible to integrate Gerrit with Backstage but it will
not be possible to open the "human readable links" found in different
places of the Backstage gui.

A new optional config field has been added to Gerrit integration where
the base url of the Gitiles installation can be set. This is needed to
create a working link to some git content.

A new "url reader" has been added that reads content from Gerrit, as of
now only "readUrl" is implemented ("readTree" will soon follow). The
format of url is the format used by Gitiles. Gerrit's "readUrl" is
pretty simple, it's a single API call to Gerrit that returns the content
base64 encoded.

What is a bit different to other "urlReaders" is the predicate
function in that is not matching the host of the Gerrrit API. The "host"
variable in the config is the Gerrit host. The address where  Gitiles is
 installed may be on the same host but it could be on a separate host.
For example a Gerrit instance could be hosted on
"gerrit-review.company.com" but the repos could be browsable on a
separate host, e.g. "gerrit.company.com" and the human readable URL would
then not point to the API host.

Signed-off-by: Niklas Aronsson <niklasar@axis.com>
2022-03-24 14:43:39 +01:00
github-actions[bot] ad955c1b1b Version Packages (next) 2022-03-22 12:28:03 +00:00
Ben Lambert 5ca72f716a Merge pull request #10238 from RoadieHQ/add-external-id-to-s3-integration
Add external ID to S3 integration
2022-03-21 10:34:51 +01:00
github-actions[bot] 0bc1611d6e Version Packages 2022-03-17 09:02:30 +00:00
Jussi Hallila b70bdac610 Modify based on code review comments.
Signed-off-by: Jussi Hallila <jussi@hallila.com>
2022-03-17 08:44:20 +01:00
Iain Billett 6927f8541a Update API report
Signed-off-by: Iain Billett <iain@roadie.io>
2022-03-16 12:09:27 +00:00
Iain Billett 1e10a3f9ef Merge remote-tracking branch 'upstream/master' into add-external-id-to-s3-integration 2022-03-15 16:57:27 +00:00
Fredrik Adelöw fc0ff39ece Merge pull request #10038 from anicke/gerrit
Added a ScmIntegration for Gerrit
2022-03-14 13:39:47 +01:00
Niklas Aronsson 0885854ff3 Fixed review comments
* Rename "apiBaseUrl" to the more suitable "baseUrl".
* Removed the Gerrit location doc (will be added later together
  with the "urlReader" implementation.
* Fixed the line number handling in Gerrit/resolveUrl.

Signed-off-by: Niklas Aronsson <niklasar@axis.com>
2022-03-14 10:34:53 +01:00
Niklas Aronsson b0c0fccacf Gerrit config: Make the apiBaseUrl optional
If the apiBaseUrl is not set assume that the gerrit instance
uses https and can be reached on the address specified by the
"host" option.

Signed-off-by: Niklas Aronsson <niklasar@axis.com>
2022-03-11 13:35:23 +01:00
Iain Billett a8c5f1a08f Add an optional external Id field
Signed-off-by: Iain Billett <iain@roadie.io>
2022-03-10 14:41:07 +00:00
Niklas Aronsson ee04b48b8f packages/integration: Updating "api-report.md" for Gerrit
Signed-off-by: Niklas Aronsson <niklasar@axis.com>
2022-03-10 08:09:17 +01:00
github-actions[bot] 1693f2dc74 Version Packages (next) 2022-03-09 16:09:04 +00:00
Niklas Aronsson 403837cbac Added a ScmIntegration for Gerrit
A new ScmIntegration has been added for reading entities from
gits hosted by Gerrit. The UrlReader implementation will be done
in an upcoming patch.

The Gerrit configuration supports the following values:

* host (required) : The host of the gerrit instance to use.
* apiBaseUrl (required): The base url of the gerrit api.
* username (optional): The username to use during authentication.
* password (optional): The password or http token to use for
  authentication.

Signed-off-by: Niklas Aronsson <niklasar@axis.com>
2022-03-08 10:13:09 +01:00
Patrik Oldsberg 09b37063f2 packages,plugins: migrate to new lint config
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
2022-03-07 14:53:43 +01:00
github-actions[bot] 3c8bb2854d Version Packages 2022-03-03 15:23:53 +00:00
Patrik Oldsberg 6ed03eeacb Merge pull request #9782 from Bonial-International-GmbH/PJ_bitbucket_default-apiBaseUrl
feat(bitbucket): ensure apiBaseUrl, replace hardcoded cases
2022-03-02 17:35:12 +01:00
Patrick Jungermann 34af86517c feat(bitbucket): ensure apiBaseUrl, replace hardcoded cases
Ensure presence of apiBaseUrl for bitbucket
integrations for both cases Bitbucket Cloud and
Bitbucket Server by setting the default for
Bitbucket Server at the integration config, too.

Replace hardcoded uses of the default apiBaseUrl
with the use of the integration config's value.

Signed-off-by: Patrick Jungermann <Patrick.Jungermann@gmail.com>
2022-02-25 15:18:17 +01:00
Fredrik Adelöw c2deefa463 Merge pull request #9797 from Bonial-International-GmbH/PJ_bitbucket_lineNumber-ref
fix(bitbucket): fix line number references
2022-02-25 10:28:48 +01:00
Patrick Jungermann 33d5e79822 fix(bitbucket): fix line number references
Use the actual line number syntax for Bitbucket Cloud
and Bitbucket Server.

Closes: #9764

Signed-off-by: Patrick Jungermann <Patrick.Jungermann@gmail.com>
2022-02-25 00:59:31 +01:00
github-actions[bot] c9da151d84 Version Packages 2022-02-24 13:54:37 +00:00
Ben Lambert 02821e4bef Merge pull request #9584 from ItzEdgar/gitlab-selfhosted-fix
Updated gitlab integration to include port
2022-02-18 11:35:58 +01:00
Patrik Oldsberg ba68ea4450 apply 0.68.1 fixes to master
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
2022-02-18 11:30:15 +01:00
Patrik Oldsberg 630340287f integration,catalog-backend: tweak changesets to make vale happy
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
2022-02-17 18:27:48 +01:00
Edgar Silva 1bc8c55822 Changed repoIDLookup to url.origin
Changed the repoIDLookup concatenation from 'url.protocol + url.host' to
'url.origin', which does essentially the same but is simpler.

Signed-off-by: Edgar Silva <edgar.silva@cross-join.com>
2022-02-17 12:50:23 +00:00
github-actions[bot] 408b0300cb Version Packages 2022-02-17 10:38:59 +00:00
Edgar Silva 2f1050ec10 Updated gitlab integration to include port
Updated integration module to allow for the use of a custom port, which
is often the case in self hosted gitlab instances

Removed host.includes(':') check in config.ts to allow for users to
include the port in the host
Changed url.hostname to url.host in core.ts to include the port in the
api call (otherwise it'll result in an error when trying to import a new
component)

Signed-off-by: Edgar Silva <edgar.silva@cross-join.com>
2022-02-16 19:18:38 +00:00
Patrik Oldsberg 9892d74326 cli: renamed script commands to package
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
2022-02-15 21:27:12 +01:00
Patrik Oldsberg 8f82d80adf migrate all package scripts
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
2022-02-14 21:50:07 +01:00
Patrik Oldsberg b521c1b83b detect all package roles
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
2022-02-14 21:50:03 +01:00
Fredrik Adelöw 1ed305728b bump node-fetch and cross-fetch
Signed-off-by: Fredrik Adelöw <freben@gmail.com>
2022-02-10 15:51:50 +01:00
github-actions[bot] e74f416a00 Version Packages (next) 2022-02-08 19:38:17 +00:00
github-actions[bot] 51eecb3f03 Version Packages (next) 2022-02-02 14:28:47 +00:00
github-actions[bot] e1580cf73a Version Packages (next) 2022-02-01 08:53:29 +00:00
github-actions[bot] 406848efee Version Packages 2022-01-27 11:07:27 +00:00