Gitlab scaffolding not working
See original GitHub issueExpected 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.
- Utilizing the ‘url’ resource type results in the error:
- If specifying ‘gitlab’ resource type (no longer supported, but hackable by setting the annotation on the template), the plugin fails with “no auth”
- 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
- Update the Scaffolding to auto-detect gitlab resource type for
type: url
- Update the Scaffolding to use the non-deprecated config locations
Steps to Reproduce
- run the create-app
- add gitlab config
- 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:
- Created 3 years ago
- Comments:5 (3 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@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.
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 inscaffolder.gitlab.api.token
instead.