You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I try to create a new template for a Component.
this is the template:
---
apiVersion: scaffolder.backstage.io/v1beta3kind: Templatemetadata:
name: system-templatetitle: New Systemdescription: Create a System from templatetags:
- systemspec:
owner: group:team-infratype: systemparameters:
- title: Provide System simple informationrequired:
- system
- description
- owner
- domain
- lifecycleproperties:
system:
title: Nametype: stringdescription: Unique name of the Systemui:field: EntityNamePickerui:autofocus: truedescription:
title: Descriptiontype: stringdescription: Help others understand what this website is for.owner:
title: Ownertype: stringdescription: Owner of the componentui:field: OwnerPickerui:options:
allowedKinds:
- Groupdomain:
title: Domaintype: stringdescription: Domain of the Systemui:field: EntityPickerui:options:
allowedKinds:
- DomaindefaultKind: Domainlifecycle:
title: Lifecycledescription: 'Application lifecycle'type: stringdefault: experimentalenum:
- deprecated
- experimental
- productiondryRun:
title: Only perform a dry run, don't publish anythingtype: booleandefault: falsesteps:
- id: fetch-templatename: Fetch System Templateaction: fetch:templateif: ${{ parameters.dryRun == false }}input:
targetPath: ./systems# url: https://gitlab.com/xxxxxxxxx/deploy-tools/-/blob/feat/backstage-app/backstage/backstage/dev/skeleton/infrastructure/systemurl: ./skeleton/infrastructure/systemvalues:
system: ${{ parameters.system }}description: ${{ parameters.description }}owner: ${{ parameters.owner }}domain: ${{ parameters.domain }}lifecycle: ${{ parameters.lifecycle }}
- id: publishname: Publishaction: publish:gitlab:merge-requestif: ${{ parameters.dryRun == false }}input:
repoUrl: gitlab.com?repo=deploy-tools&owner=xxxxxxxxtitle: "[Backstage] Creating catalog-info.yaml for ${{ parameters.component }}"branchName: backstage/create-${{ parameters.component }}description: | # New project: ${{ parameters.component }} ${{ parameters.description if parameters.description }}targetPath: backstage/backstage/dev/components/${{ parameters.component }}token: ${{ secrets.GITLAB_TOKEN }}commitAction: createremoveSourceBranch: true# assignee: ${{ parameters.assignee }}# - id: register# name: Register Application in Catalog# action: catalog:register# if: ${{ parameters.dryRun !== true }}# input:# repoContentsUrl: ${{ steps.publish.output.repoContentsUrl }}# catalogInfoPath: "/catalog-info.yaml"
- name: Resultsif: ${{ parameters.dryRun }}action: debug:loginput:
listWorkspace: trueoutput:
links:
- title: Go to GitOps Pull Requesturl: ${{ steps.open-pr.output.remoteUrl }}
- title: Open in catalogicon: catalogentityRef: ${{ steps.register.output.entityRef }}
👍 Expected behavior
download the template.
👎 Actual Behavior with Screenshots
12023-06-13T09:23:28.146Z Beginning step Fetch System Template
22023-06-13T09:23:28.174Z info: Fetching template content from remote URL3
2023-06-13T09:23:29.102Z NotFoundError: Failed to read tree (archive) from https://gitlab.com/xxx/deploy-tools/-/blob/feat%2Fbackstage-app/backstage/backstage/dev/templates/skeleton/infrastructure/system, Opens in a new window, 404 Not Found4
at _GitlabUrlReader.readTree (/app/node_modules/@backstage/backend-common/dist/index.cjs.js:2580:15)5
at runMicrotasks (<anonymous>)6
at processTicksAndRejections (node:internal/process/task_queues:96:5)7
at async UrlReaderPredicateMux.readTree (/app/node_modules/@backstage/backend-common/dist/index.cjs.js:3170:16)8
at async fetchContents (/app/node_modules/@backstage/plugin-scaffolder-backend/dist/cjs/ScaffolderEntitiesProcessor-021c5dcb.cjs.js:579:17)9
at async Object.handler (/app/node_modules/@backstage/plugin-scaffolder-backend/dist/cjs/ScaffolderEntitiesProcessor-021c5dcb.cjs.js:1020:7)10
at async NunjucksWorkflowRunner.executeStep (/app/node_modules/@backstage/plugin-scaffolder-backend/dist/cjs/ScaffolderEntitiesProcessor-021c5dcb.cjs.js:5201:7)11
at async NunjucksWorkflowRunner.execute (/app/node_modules/@backstage/plugin-scaffolder-backend/dist/cjs/ScaffolderEntitiesProcessor-021c5dcb.cjs.js:5266:9)12
at async TaskWorker.runOneTask (/app/node_modules/@backstage/plugin-scaffolder-backend/dist/cjs/ScaffolderEntitiesProcessor-021c5dcb.cjs.js:5481:26)13
at async run (/app/node_modules/p-queue/dist/index.js:163:29)
It seems from the error message that the registered URL contains the extra text , Opens in a new window at the end. Look at the end of the traceback's error message. That would for sure lead to a 404! Maybe you accidentally copy pasted it wrong?
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
📜 Description
I try to create a new template for a Component.
this is the template:
👍 Expected behavior
download the template.
👎 Actual Behavior with Screenshots
👟 Reproduction steps
Try to create a new component
📃 Provide the context for the Bug.
but if i open in a browser the URL from the console log (https://gitlab.com/xxx/deploy-tools/-/blob/feat%2Fbackstage-app/backstage/backstage/dev/templates/skeleton/infrastructure/system), it works fine
My Kubernetes pod have an environment variable
GITLAB_TOKEN
🖥️ Your Environment
Backstage deployed in a Kubernetes cluster using the Helm chart.
The application works fine.
👀 Have you spent some time to check if this bug has been raised before?
🏢 Have you read the Code of Conduct?
Are you willing to submit PR?
None
The text was updated successfully, but these errors were encountered: