Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add scaffolder action for the scaffolder relation link #1605

Closed

Conversation

Zaperex
Copy link
Member

@Zaperex Zaperex commented May 2, 2024

Description

Adds a custom scaffolder action appends the spec.scaffoldedFrom field to the catalog-info.yaml of the generated catalog entities. Used in conjunction with the scaffolder relation processor to form relation links between scaffolder templates and the entities they generate.

What issue(s) does this fix?

Fixes: RHIDP-2221

How to test changes / Special notes to the reviewer

  1. Install the module using the instructions in the README.md
  2. Import a template with the scaffolder action. ex:
catalog:
  locations:
    - type: url
      target: https://github.com/Zaperex/backstage-plugins/blob/76062120bd68f78d658f7b4c781611c2c3c95b42/plugins/scaffolder-backend-module-scaffolder-relation/examples/01-scaffolder-relation.yaml
      rules:
        - allow: [Template]
  1. Use the template to register a catalog entity into the catalog and observe that the spec.scaffoldedFrom field exists and its value matches the entityRef of the template that generated it.
  2. If the scaffolder relation processor, the dependency graph of the ingested component should include a scaffoldedFrom link to the template

@Zaperex Zaperex requested review from a team as code owners May 2, 2024 21:38
@openshift-ci openshift-ci bot requested review from gashcrumb and invincibleJai May 2, 2024 21:38
Copy link

openshift-ci bot commented May 2, 2024

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign andrienkoaleksandr for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Copy link

sonarcloud bot commented May 2, 2024

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@Zaperex
Copy link
Member Author

Zaperex commented May 6, 2024

Closing in favor of #1567

@Zaperex Zaperex closed this May 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant