backstage: Can't import GitLab repository as a Software Catalog

Hi, I try add new software catalog to our project this https://github.com/backstage/backstage/blob/master/packages/catalog-model/examples/components/artist-lookup-component.yaml example successfully added.

When i try add a gitlab repository like this https://gitlab.trendyol.com/erdogan.oksuz/my-catalog-test2/-/blob/master/test-component.yaml

its gives me Location was added but has no entities specified yet: https://gitlab.trendyol.com/erdogan.oksuz/my-catalog-test2/-/blob/master/test-component.yaml

Screen Shot 2021-03-04 at 15 54 01

Then i try add like this https://gitlab.trendyol.com/erdogan.oksuz/my-catalog-test my repository contains a catalog-info.yaml

its gives me Invalid GitLab integration config, 'undefined' is not a valid apiBaseUrl

Screen Shot 2021-03-04 at 12 34 22

If i add this catalog to my app-config.yaml manually i can see my software catalog.

Screen Shot 2021-03-04 at 12 40 09

Expected Behavior

It should be added as Software Catalog.

Current Behavior

Repository form gets me error

Possible Solution

When i add breakpoints to https://github.com/backstage/backstage/blob/f6171e41c814f8385a014823689fa97bcbcd1390/packages/integration/src/gitlab/config.ts#L70 i see only host

Screen Shot 2021-03-04 at 12 48 31

Steps to Reproduce

Here my configuration

integrations:
  gitlab:
    - host: gitlab.trendyol.com
      apiBaseUrl: https://gitlab.trendyol.com/api/v4
      rawBaseUrl: https://gitlab.trendyol.com
      token: TOKEN
scaffolder:
  gitlab:
    api:
      baseUrl: https://gitlab.trendyol.com
      token: TOKEN
      apiBaseUrl: https://gitlab.trendyol.com/api/v4
  1. Visit /catalog-import
  2. Paste https://gitlab.trendyol.com/erdogan.oksuz/my-catalog-test2/-/blob/master/test-component.yaml or https://gitlab.trendyol.com/erdogan.oksuz/my-catalog-test2
  3. Click Analyze

Context

I want a POC for Software Catalog.

Your Environment

  • NodeJS Version (v12): 14.15.4
  • Operating System and Version (e.g. Ubuntu 14.04): macOS Catalina 10.15.7
  • Browser Information: Google Chrome Version 89.0.4389.72 (Official Build) (x86_64)

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Reactions: 1
  • Comments: 25 (15 by maintainers)

Most upvoted comments

Whoa wait, now I feel dumb - yes, the import feature (as opposed to linking to individual yaml files) does indeed only support GitHub still. It’s a work in progress. I should have been able to give that hint sooner, sorry.

don’t stress about it. it was fun getting to know the codebase. 😃