question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Gitlab scaffolding not working

See original GitHub issue

Expected Behavior

When I configure the Gitlab settings in the scaffolding plugin, I expect to be able to target Gitlab for destination of scaffolding templates.

Current Behavior

Scaffolding a project using a template that targets Gitlab fails at several points.

  1. Utilizing the ‘url’ resource type results in the error:
  2. If specifying ‘gitlab’ resource type (no longer supported, but hackable by setting the annotation on the template), the plugin fails with “no auth”
  3. The config used by the Gitlab code is deprecated catalog.processors.gitlabApi.privateToken, and causes the backend to fail with error:

Error: Using deprecated configuration for catalog.processors.gitlabApi, move to using integrations.gitlab instead

Possible Solution

  1. Update the Scaffolding to auto-detect gitlab resource type for type: url
  2. Update the Scaffolding to use the non-deprecated config locations

Steps to Reproduce

  1. run the create-app
  2. add gitlab config
  3. try to create a template
integrations:
  gitlab:
    - host: gitlab.com
      token:
        $env: GITLAB_TOKEN
...
scaffolder:
  gitlab:
    api:
      baseUrl: https://gitlab.com
      token:
        $env: GITLAB_TOKEN
    visibility: internal # or 'internal' or 'private'
...
catalog:
  rules:
    - allow: [Component, API, Group, User, Template, Location]
  locations:
    - type: url
      target: https://gitlab.com/somegroup/somerepo/-/blob/master/template.yaml
      rules:
        - allow: [Template]

Context

I’m trying to use Backstage with Gitlab.

Your Environment

n/a

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
frebencommented, Dec 18, 2020

@adamdmharvey We’ll have a larger stab at rewriting all of this in the beginning of next year. The way that it deduces credentials should be overhauled (and tied to GitHub apps and similar where possible), and AT LEAST be unified to look the same across the various classes.

1reaction
frebencommented, Dec 18, 2020

Hoping that this fixes it for you https://github.com/backstage/backstage/pull/3778

It tries to fall back to the token in integrations if there is one. The publisher does not yet do that though, so it’s best to stay with the particular token passed in scaffolder.gitlab.api.token instead.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Create scaffolding for Content Editor (#321442) · Issues - GitLab
Problem to solve The new Rich Text Editor needs a solid foundation on which we can build.
Read more >
Asp.net core 6 / Scaffolding failed, Could not load information ...
After updating to Design 6.0.10 I was able to scaffold a controller including EF db context model. But I still get an error...
Read more >
.NET Identity Scaffolding Error - YouTube
If you are taking a .NET Course, where we are using the .NET Identity Class Library for Authentication. Then with the latest update...
Read more >
Using Skaffold for CI/CD with GitLab
Docker images are typically not cached if you are running your builds/pipeline within Docker containers(i.e. DIND or Docker-in-Docker) and this ...
Read more >
[META] Define a default .gitlab-ci.yml template that ... - Drupal
Problem /Motivation When configuring testing for a drupal ... What, and how, we scaffold a project is still up for discussion.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found