49 KiB
@backstage/plugin-scaffolder-backend
0.15.18
Patch Changes
- Updated dependencies
- @backstage/backend-common@0.10.0
- @backstage/catalog-client@0.5.3
- @backstage/plugin-catalog-backend@0.19.3
- @backstage/plugin-scaffolder-backend-module-cookiecutter@0.1.6
0.15.17
Patch Changes
eec0750d8d: Makes cookiecutter a default, but optional action based on if a containerRunner argument is passed in to createRouter or createBuiltinActionsed52f74ab3: Adding changes to create GitLab Merge Request using custom action- Updated dependencies
- @backstage/plugin-catalog-backend@0.19.2
- @backstage/backend-common@0.9.14
- @backstage/catalog-model@0.9.8
0.15.16
Patch Changes
2a3fb13718: Bump esbuild to ^0.14.1- Updated dependencies
- @backstage/backend-common@0.9.13
- @backstage/plugin-catalog-backend@0.19.1
0.15.15
Patch Changes
0398ea25d3: Removed unused scaffolder visibility configuration; this has been moved to publish actions. Deprecated scaffolder provider configuration keys; these should use the integrations configuration instead.b055a6addc: Align on usage ofcross-fetchvsnode-fetchin frontend vs backend packages, and remove some unnecessary imports of either one of themc6b44d80ad: Add options to spawn in runCommand helper- Updated dependencies
- @backstage/integration@0.6.10
- @backstage/plugin-catalog-backend@0.19.0
- @backstage/plugin-scaffolder-backend-module-cookiecutter@0.1.5
- @backstage/backend-common@0.9.12
0.15.14
Patch Changes
a096e4c4d7: Switched to executing scaffolder templating in a secure context for any template based on nunjucks, as it is not secure by default.f9352ab606: Removed all usages ofpath.resolvein order to ensure that template paths are resolved in a safe way.e634a47ce5: Fix bug where there was error log lines written when failing toJSON.parsethings that were notJSONvalues.42ebbc18c0: Bump gitbeaker to the latest version- Updated dependencies
- @backstage/errors@0.1.5
- @backstage/plugin-catalog-backend@0.18.0
- @backstage/backend-common@0.9.11
0.15.13
Patch Changes
26eb174ce8: Skip empty file names when scaffolding with nunjucksecdcbd08ee: Expose template metadata to custom action handler in Scaffolder.- Updated dependencies
- @backstage/catalog-client@0.5.2
- @backstage/catalog-model@0.9.7
- @backstage/backend-common@0.9.10
- @backstage/plugin-catalog-backend@0.17.4
0.15.12
Patch Changes
-
9990df8a1f: Expose some classes and interfaces public so TaskWorkers can run externally from the scaffolder API. -
b45a34fb15: Adds a new endpoint for consuming logs from the Scaffolder that uses long polling instead of Server Sent Events.This is useful if Backstage is accessed from an environment that doesn't support SSE correctly, which happens in combination with certain enterprise HTTP Proxy servers.
It is intended to switch the endpoint globally for the whole instance. If you want to use it, you can provide a reconfigured API to the
scaffolderApiRef:// packages/app/src/apis.ts // ... import { scaffolderApiRef, ScaffolderClient, } from '@backstage/plugin-scaffolder'; export const apis: AnyApiFactory[] = [ // ... createApiFactory({ api: scaffolderApiRef, deps: { discoveryApi: discoveryApiRef, identityApi: identityApiRef, scmIntegrationsApi: scmIntegrationsApiRef, }, factory: ({ discoveryApi, identityApi, scmIntegrationsApi }) => new ScaffolderClient({ discoveryApi, identityApi, scmIntegrationsApi, // use long polling instead of an eventsource useLongPollingLogs: true, }), }), ]; -
a794c341ca: Fix a bug where only file mode 775 is considered an executable -
Updated dependencies
- @backstage/backend-common@0.9.9
- @backstage/catalog-client@0.5.1
- @backstage/plugin-catalog-backend@0.17.3
- @backstage/plugin-scaffolder-backend-module-cookiecutter@0.1.4
0.15.11
Patch Changes
10615525f3: Switch to use the json and observable types from@backstage/types41c49884d2: Start using the new@backstage/typespackage. Initially, this means using theObservableandJson*types from there. The types also remain in their old places but deprecated, and will be removed in a future release.e55a5dea09: Fixed bug where the mode of an executable file was ignored- Updated dependencies
- @backstage/plugin-catalog-backend@0.17.2
- @backstage/config@0.1.11
- @backstage/errors@0.1.4
- @backstage/integration@0.6.9
- @backstage/backend-common@0.9.8
- @backstage/catalog-model@0.9.6
- @backstage/plugin-scaffolder-backend-module-cookiecutter@0.1.3
- @backstage/plugin-scaffolder-common@0.1.1
0.15.10
Patch Changes
b149e94290: Allowcatalog:registeraction to register optional locations36e67d2f24: Internal updates to apply more strict checks to throw errors.- Updated dependencies
- @backstage/plugin-catalog-backend@0.17.1
- @backstage/backend-common@0.9.7
- @backstage/errors@0.1.3
- @backstage/catalog-model@0.9.5
0.15.9
Patch Changes
0f99f1170e: Make suresourcePathofpublish:github:pull-requestcan only be used to retrieve files from the workspace.
0.15.8
Patch Changes
42c618abf6: UseresolveSafeChildPathin thefetchContentsfunction to forbid reading files outside the base directory when a template is registered from afile:location.18083d1821: Introduce the newscaffolder.backstage.io/v1beta3template kind with nunjucks support 🥋- Updated dependencies
- @backstage/integration@0.6.8
- @backstage/plugin-catalog-backend@0.17.0
0.15.7
Patch Changes
ca3086a7ad: Fixed a bug where thecatalog:registeraction would not return any entity when running towards recent versions of the catalog.- Updated dependencies
- @backstage/catalog-model@0.9.4
- @backstage/backend-common@0.9.6
- @backstage/catalog-client@0.5.0
- @backstage/integration@0.6.7
0.15.6
Patch Changes
- Updated dependencies
- @backstage/integration@0.6.5
- @backstage/catalog-client@0.4.0
- @backstage/catalog-model@0.9.3
- @backstage/backend-common@0.9.4
- @backstage/config@0.1.10
0.15.5
Patch Changes
618143c3c7: Action needed: If you are using the templates located at https://github.com/backstage/backstage/tree/master/ in your Backstage app directly using the URL via theapp-config.yaml, you should copy over the templates inside your org and import from there. The templates have now been moved to https://github.com/backstage/software-templates. See https://github.com/backstage/backstage/issues/6415 for explanation.cfade02127: Change hardcoded branchmasterto $defaultBranch in GitLab provider96fef17a18: Upgrade git-parse-url to v11.6.0- Updated dependencies
- @backstage/backend-common@0.9.3
- @backstage/integration@0.6.4
0.15.4
Patch Changes
04aad2dab: Fix issue #7021 scaffolder action fetch:template preserves templates file permissions21ccd4997: GitHub Webhook action in Scaffolder Backend has been improved to validate event names against Octokit Webhook event names list.- Updated dependencies
- @backstage/catalog-client@0.3.19
- @backstage/catalog-model@0.9.2
- @backstage/errors@0.1.2
- @backstage/config@0.1.9
- @backstage/backend-common@0.9.2
0.15.3
Patch Changes
3f9dd1759: GitHub create repository webhook action:github:webhookfor Backstage plugin Scaffolder has been added.774b08a5c: GitHubWebhook Action can be created with a default webhook secret. This allows getting secret from environment variable as an alternative to get it from context.536f4d844: Updated dependencies0b92a1e74: refactor: extract common Octokit related code and use it in actions:publish:github,github:actions:dispatch,github:webhook.- Updated dependencies
- @backstage/integration@0.6.3
- @backstage/catalog-model@0.9.1
- @backstage/backend-common@0.9.1
0.15.2
Patch Changes
-
b438caf63: Add partial templating tofetch:templateaction.If an
templateFileExtensioninput is given, only files with that extension get their content processed. IftemplateFileExtensionistrue, the.njkextension is used. ThetemplateFileExtensioninput is incompatible with bothcookiecutterCompatandcopyWithoutRender.All other files get copied.
All output paths are subject to applying templating logic.
-
1ce9b9571: Use more efficient approach to staging files in git during scaffolder actions -
Updated dependencies
- @backstage/backend-common@0.9.0
- @backstage/integration@0.6.2
- @backstage/config@0.1.8
- @backstage/plugin-scaffolder-backend-module-cookiecutter@0.1.2
0.15.1
Patch Changes
d622cfad1: GitHub branch protection option 'Require review from Code Owners' can be enabled by addingrequireCodeOwnersReview: truein context input.
0.15.0
Minor Changes
e30646aeb: Add Bitbucket workspace and project fields to RepoUrlPicker to support Bitbucket cloud and server
Patch Changes
8bedb75ae: Update Luxon dependency to 2.x- Updated dependencies
- @backstage/integration@0.6.0
- @backstage/backend-common@0.8.9
- @backstage/plugin-scaffolder-backend-module-cookiecutter@0.1.1
0.14.2
Patch Changes
6cf48c609: Add thescaffolder.defaultCommitMessage, which defaults toInitial commit, so it can be customized.48ea3d25b: The recommended value for abackstage.io/techdocs-refannotation is nowdir:., indicating "documentation source files are located in the same directory relative to the catalog entity." Note thaturl:<location>values are still supported.- Updated dependencies
- @backstage/backend-common@0.8.8
- @backstage/config@0.1.6
- @backstage/integration@0.5.9
0.14.1
Patch Changes
-
c73f53bc2: Add new built-in action ci:github-actions-dispatch -
7cea90592: - Move out thecookiecuttertemplating to its own module that is depended on by thescaffolder-backendplugin. No breaking change yet, but we will drop first class support forcookiecutterin the future and it will become an opt-in feature. -
eb740ee24: Moved sample software templates to the backstage/software-templates repository. If you previously referenced the sample templates straight fromscaffolder-backendplugin in the main backstage/backstage repository in yourapp-config.yaml, these references will need to be updated. -
Updated dependencies
- @backstage/catalog-client@0.3.17
- @backstage/backend-common@0.8.7
0.14.0
Minor Changes
-
96fc27698: Updated inputs for thepublish:github:pull-requestaction.Now requires a
repoUrlinstead of separateownerandrepoinputs. This aligns with the output of theRepoUrlPickerui field used by the pull-request sample template.
Patch Changes
-
e75506fe7: Unsubscribe from broker after response is flushed -
ea1d956ef: Updating fs-extra to 10.0.0 to handle broken symbolic links correctly -
31de5f27f: Add newfetch:templateaction which handles the same responsibilities asfetch:cookiecutterwithout the external dependency oncookiecutter. For information on migrating fromfetch:cookiecuttertofetch:template, see the migration guide in the docs. -
84d329e2a: Scaffolder: Added an 'eq' handlebars helper for use in software template YAML files. This can be used to execute a step depending on the value of an input, e.g.:steps: id: 'conditional-step' action: 'custom-action' if: '{{ eq parameters.myvalue "custom" }}', -
ae84b20cf: Revert the upgrade tofs-extra@10.0.0as that seemed to have broken all installs inexplicably. -
Updated dependencies
- @backstage/backend-common@0.8.6
0.13.0
Minor Changes
-
60e830222: Support forTemplatekinds with versionbackstage.io/v1alpha1has now been removed. This means that the old method of running templates withPreparers,TemplatersandPublishershas also been removed. If you had any logic in these abstractions, they should now be moved toactionsinstead, and you can find out more about those in the documentationIf you need any help migrating existing templates, there's a migration guide. Reach out to us on Discord in the #support channel if you're having problems.
The
scaffolder-backendnow no longer requires thesePreparers,Templaters, andPublishersto be passed in, now all it needs is thecontainerRunner.Please update your
packages/backend/src/plugins/scaffolder.tslike the following- import { - DockerContainerRunner, - SingleHostDiscovery, - } from '@backstage/backend-common'; + import { DockerContainerRunner } from '@backstage/backend-common'; import { CatalogClient } from '@backstage/catalog-client'; - import { - CookieCutter, - CreateReactAppTemplater, - createRouter, - Preparers, - Publishers, - Templaters, - } from '@backstage/plugin-scaffolder-backend'; + import { createRouter } from '@backstage/plugin-scaffolder-backend'; import Docker from 'dockerode'; import { Router } from 'express'; import type { PluginEnvironment } from '../types'; export default async function createPlugin({ config, database, reader, + discovery, }: PluginEnvironment): Promise<Router> { const dockerClient = new Docker(); const containerRunner = new DockerContainerRunner({ dockerClient }); - const cookiecutterTemplater = new CookieCutter({ containerRunner }); - const craTemplater = new CreateReactAppTemplater({ containerRunner }); - const templaters = new Templaters(); - templaters.register('cookiecutter', cookiecutterTemplater); - templaters.register('cra', craTemplater); - - const preparers = await Preparers.fromConfig(config, { logger }); - const publishers = await Publishers.fromConfig(config, { logger }); - const discovery = SingleHostDiscovery.fromConfig(config); const catalogClient = new CatalogClient({ discoveryApi: discovery }); return await createRouter({ - preparers, - templaters, - publishers, + containerRunner, logger, config, database, -
7cad18e2f: Addingconfig: Configas a required argument tocreateBuiltinActionsand downstream methods in order to support configuration of the default git author used for Scaffolder commits.The affected methods are:
createBuiltinActionscreatePublishGithubActioncreatePublishGitlabActioncreatePublishBitbucketActioncreatePublishAzureAction
Call sites to these methods will need to be migrated to include the new
configargument. SeecreateRouterinplugins/scaffolder-backend/src/service/router.tsfor an example of adding this new argument.To configure the default git author, use the
defaultAuthorkey underscaffolderinapp-config.yaml:scaffolder: defaultAuthor: name: Example email: example@example.com
Patch Changes
dad481793: add default branch property for publish GitLab, Bitbucket and Azure actions62c2f10f7: Added filesystem remove/rename built-in actions6841e0113: fix minor version of git-url-parse as 11.5.x introduced a bug for Bitbucket Server11e66e804: bump azure-devops-node to 10.2.27a3ad92b5: Export thefetchContentsfrom scaffolder-backendc2db794f5: add defaultBranch property for publish GitHub action253136fba: removing mandatory of protection for the default branch, that could be handled by the GitHub automation in async manner, thus throwing floating errors- Updated dependencies
- @backstage/integration@0.5.8
- @backstage/catalog-model@0.9.0
- @backstage/backend-common@0.8.5
- @backstage/catalog-client@0.3.16
0.12.4
Patch Changes
1627daac2: Fixcatalog:writeon windows systemsab5cc376f: Use new utilities from@backstage/backend-commonfor safely resolving child paths- Updated dependencies
- @backstage/backend-common@0.8.4
- @backstage/integration@0.5.7
- @backstage/catalog-client@0.3.15
0.12.3
Patch Changes
a7f5fe7d7: created an action to write a catalog-info file71416fb64: Moved installation instructions from the main backstage.io documentation to the package README file. These instructions are not generally needed, since the plugin comes installed by default withnpx @backstage/create-app.c18a3c2ae: Correctly recognize whether the cookiecutter command exists- Updated dependencies
- @backstage/catalog-client@0.3.14
- @backstage/catalog-model@0.8.4
0.12.2
Patch Changes
b49222176: Keep the empty string as empty string ininputrather than replacing withundefinedto make empty values ok forcookiecutter
0.12.1
Patch Changes
-
55a834f3c: Use the correct parameter to create a public repository in Bitbucket Server for the v2 templates -
745351190: Describepublish:githubscaffolder action fieldsThis change adds a description to the fields with examples of what to input. The
collaboratorsdescription is also expanded a bit to make it more clear that these are additional compared to access and owner. -
090dfe65d: Adds support to enable LFS for hosted Bitbucket -
878c1851d: Add atopicsinput topublish:githubaction that can be used to set topics on the repository upon creation. -
4ca322826: Migrate from thecommand-exists-promisedependency tocommand-exists. -
df3ac03cf: Use the correct parameter to create a public repository in Bitbucket Server. -
Updated dependencies
- @backstage/backend-common@0.8.3
- @backstage/catalog-model@0.8.3
0.12.0
Minor Changes
66c6bfebd: Scaffolding a repository in Bitbucket will now use the apiBaseUrl if it is provided instead of only the host parameter
Patch Changes
-
27a9b503a: Introduce conditional steps in scaffolder templates.A step can now include an
ifproperty that only executes a step if the condition is truthy. The condition can include handlebar templates.- id: register if: '{{ not parameters.dryRun }}' name: Register action: catalog:register input: repoContentsUrl: '{{ steps.publish.output.repoContentsUrl }}' catalogInfoPath: '/catalog-info.yaml'Also introduces a
nothelper in handlebar templates that allows to negate boolean expressions. -
55a253de2: Migrating oldbackstage.io/v1alpha1templates tobackstage.io/v1beta2Deprecating the
create-react-appTemplate. We're planning on removing thecreate-react-apptemplater, as it's been a little tricky to support and takes 15mins to run in a container. We've currently cached a copy of the output forcreate-react-appand ship that under our sample templates folder. If you want to continue using it, we suggest copying the template out of there and putting it in your own repository as it will be removed in upcoming releases.We also recommend removing this entry from your
app-config.yamlif it exists:- - type: url - target: https://github.com/backstage/backstage/blob/master/plugins/scaffolder-backend/sample-templates/create-react-app/template.yaml - rules: - - allow: [Template] -
f26e6008f: Adddebug:logaction for debugging. -
4f8cf50fe: Update gitbeaker past the broken version without a dist folder -
Updated dependencies [
92963779b] -
Updated dependencies [
27a9b503a] -
Updated dependencies [
70bc30c5b] -
Updated dependencies [
eda9dbd5f]- @backstage/backend-common@0.8.2
- @backstage/catalog-model@0.8.2
- @backstage/catalog-client@0.3.13
- @backstage/integration@0.5.6
0.11.5
Patch Changes
6fe1567a7: This adds a configuration option to the scaffolder plugin router, so we can allow for multipleTaskWorkers. Currently with only oneTaskWorkeryou are limited to scaffolding one thing at a time. Set thetaskWorkers?: numberoption in your scaffolder router to get more than 1TaskWorker- Updated dependencies [
ebe802bc4] - Updated dependencies [
49d7ec169]- @backstage/catalog-model@0.8.1
- @backstage/integration@0.5.5
0.11.4
Patch Changes
260aaa684: Bump@gitbeakerdependencies to29.x.- Updated dependencies [
0fd4ea443] - Updated dependencies [
add62a455] - Updated dependencies [
704875e26]- @backstage/integration@0.5.4
- @backstage/catalog-client@0.3.12
- @backstage/catalog-model@0.8.0
0.11.3
Patch Changes
021eb366a: Instead of failing, warn when you need to pay for GitHub Pro.
0.11.2
Patch Changes
f7f7783a3: Add Owner field in template card and new data distribution Add spec.owner as optional field into TemplateV1Alpha and TemplateV1Beta Schema Add relations ownedBy and ownerOf into Template entity Template documentation updated65e6c4541: Remove circular dependencies81d7b9c6f: Added deprecation warnings forv1alpha1templates9962faa2b: Add branch protection for default branches of scaffolded GitHub repositories- Updated dependencies [
f7f7783a3] - Updated dependencies [
c7dad9218] - Updated dependencies [
65e6c4541] - Updated dependencies [
68fdbf014] - Updated dependencies [
5001de908]- @backstage/catalog-model@0.7.10
- @backstage/backend-common@0.8.1
- @backstage/integration@0.5.3
0.11.1
Patch Changes
062bbf90f: chore: bump@testing-library/user-eventfrom 12.8.3 to 13.1.882ca1ac22: The apiBaseUrl setting for Bitbucket Server integrations will now be used when it is set. Otherwise, it will default back to the host setting.fd39d4662: Movejest-whento the dev dependencies- Updated dependencies [
22fd8ce2a] - Updated dependencies [
10c008a3a] - Updated dependencies [
f9fb4a205] - Updated dependencies [
16be1d093]- @backstage/backend-common@0.8.0
- @backstage/catalog-model@0.7.9
0.11.0
Minor Changes
-
e0bfd3d44: Migrate the plugin to use theContainerRunnerinterface instead ofrunDockerContainer(…). It also provides theContainerRunnerto the individual templaters instead of to thecreateRouterfunction.To apply this change to an existing backend application, add the following to
src/plugins/scaffolder.ts:- import { SingleHostDiscovery } from '@backstage/backend-common'; + import { + DockerContainerRunner, + SingleHostDiscovery, + } from '@backstage/backend-common'; export default async function createPlugin({ logger, config, database, reader, }: PluginEnvironment): Promise<Router> { + const dockerClient = new Docker(); + const containerRunner = new DockerContainerRunner({ dockerClient }); + const cookiecutterTemplater = new CookieCutter({ containerRunner }); - const cookiecutterTemplater = new CookieCutter(); + const craTemplater = new CreateReactAppTemplater({ containerRunner }); - const craTemplater = new CreateReactAppTemplater(); const templaters = new Templaters(); templaters.register('cookiecutter', cookiecutterTemplater); templaters.register('cra', craTemplater); const preparers = await Preparers.fromConfig(config, { logger }); const publishers = await Publishers.fromConfig(config, { logger }); - const dockerClient = new Docker(); const discovery = SingleHostDiscovery.fromConfig(config); const catalogClient = new CatalogClient({ discoveryApi: discovery }); return await createRouter({ preparers, templaters, publishers, logger, config, - dockerClient, database, catalogClient, reader, }); }
Patch Changes
38ca05168: The default@octokit/restdependency was bumped to"^18.5.3".69eefb5ae: Fix GithubPR built-in actioncredentialsProvider.getCredentialsURL. Adding Documentation for GitHub PR built-in action.75c8cec39: bumpjsonschemafrom 1.2.7 to 1.4.0- Updated dependencies [
e0bfd3d44] - Updated dependencies [
38ca05168] - Updated dependencies [
d8b81fd28] - Updated dependencies [
d1b1306d9]- @backstage/backend-common@0.7.0
- @backstage/integration@0.5.2
- @backstage/catalog-model@0.7.8
- @backstage/config@0.1.5
- @backstage/catalog-client@0.3.11
0.10.1
Patch Changes
a1783f306: Added thenebula-previewpreview toOctokitfor repository visibility.
0.10.0
Minor Changes
-
49574a8a3: Fix somespleling.The
scaffolder-backendhas a configuration schema change that may be breaking in rare circumstances. Due to a typo in the schema, thescaffolder.github.visibility,scaffolder.gitlab.visibility, andscaffolder.bitbucket.visibilitydid not get proper validation that the value is one of the supported strings (public,internal(not available for Bitbucket), andprivate). If you had a value that was not one of these three, you may have to adjust your config.
Patch Changes
84c54474d: Forward user token to scaffolder task for subsequent api requests- Updated dependencies [
d367f63b5] - Updated dependencies [
b42531cfe]- @backstage/backend-common@0.6.3
0.9.6
Patch Changes
-
d8ffec739: Add built-in publish action for creating GitHub pull requests. -
7abec4dbc: Fix for thefile://protocol check in theFilePreparerbeing too strict, breaking Windows. -
d840d30bc: Bitbucket server needs username to be set as well as the token or appPassword for the publishing process to work.integrations: bitbucket: - host: bitbucket.mycompany.com apiBaseUrl: https://bitbucket.mycompany.com/rest/api/1.0 token: token username: username -
b25846562: Enable the JSON parsing of the response from templated variables in thev2beta1syntax. Previously if template parameters json strings they were left as strings, they are now parsed as JSON objects.Before:
- id: test name: test-action action: custom:run input: input: '{"hello":"ben"}'Now:
- id: test name: test-action action: custom:run input: input: hello: benAlso added the
parseRepoUrlandjsonhelpers to the parameters syntax. You can now use these helpers to parse work with somejsonorrepoUrlstrings in templates.- id: test name: test-action action: cookiecutter:fetch input: destination: '{{ parseRepoUrl parameters.repoUrl }}'Will produce a parsed version of the
repoUrlof type{ repo: string, owner: string, host: string }that you can use in your actions. Specificallycookiecutterwith{{ cookiecutter.destination.owner }}like theplugins/scaffolder-backend/sample-templates/v1beta2-demo/template.yamlexample. -
a376e3ee8: Adds a collaborator field to GitHub publish action for multiple users and access levels -
423a514c3: Fix execution of the GitHub Pull Request publish action on Windows. -
0b7fd7a9d: Fix bug in pull request sample template. -
Updated dependencies [
bb5055aee] -
Updated dependencies [
5d0740563] -
Updated dependencies [
442f34b87]- @backstage/catalog-model@0.7.7
- @backstage/catalog-client@0.3.10
0.9.5
Patch Changes
802b41b65: Allow custom directory to be specified for GitHub publish action- Updated dependencies [
97b60de98] - Updated dependencies [
98dd5da71] - Updated dependencies [
b779b5fee]- @backstage/catalog-model@0.7.6
- @backstage/backend-common@0.6.2
0.9.4
Patch Changes
2ab6f3ff0: Add OwnerPicker component to scaffolder for specifying a component's owner from users and groups in the catalog.164cc4c53: Fix a bug with GitHub Apps support not parsing the URL correctly- Updated dependencies [
676ede643] - Updated dependencies [
b196a4569] - Updated dependencies [
8488a1a96] - Updated dependencies [
37e3a69f5]- @backstage/catalog-client@0.3.9
- @backstage/catalog-model@0.7.5
- @backstage/backend-common@0.6.1
0.9.3
Patch Changes
9f2e51e89: Fixes bug in thegithub:publishaction causing repositories to be set as private even if the visibility is set to internal91e87c055: Add inputs for actionfetch:cookiecutter: copyWithoutRender, extensions, imageName113d3d59e: Added apublish:fileaction to use for local development. The action is not installed by default.
0.9.2
Patch Changes
8b4f7e42a: Forward authorization on scaffolder backend requests8686eb38c: Use errors from@backstage/errors- Updated dependencies [
8686eb38c] - Updated dependencies [
8686eb38c] - Updated dependencies [
0434853a5] - Updated dependencies [
8686eb38c]- @backstage/catalog-client@0.3.8
- @backstage/backend-common@0.6.0
- @backstage/config@0.1.4
0.9.1
Patch Changes
-
d7245b733: Remove runDockerContainer, and start using the utility function provided by @backstage/backend-common -
0b42fff22: Make use of parseLocationReference/stringifyLocationReference -
c532c1682: Fixes task failures caused by undefined step input -
761698831: Bump to the latest version of the Knex library. -
f98f212e4: Introduce scaffolder actions page which lists all available actions along with documentation about their input/output.Allow for actions to be extended with a description.
The list actions page is by default available at
/create/actions. -
2e57922de: Update GitHub publisher to display a more helpful error message when repository access update fails. -
Updated dependencies [
277644e09] -
Updated dependencies [
52f613030] -
Updated dependencies [
d7245b733] -
Updated dependencies [
0b42fff22] -
Updated dependencies [
0b42fff22] -
Updated dependencies [
905cbfc96] -
Updated dependencies [
761698831] -
Updated dependencies [
d4e77ec5f]- @backstage/integration@0.5.1
- @backstage/backend-common@0.5.6
- @backstage/catalog-model@0.7.4
- @backstage/catalog-client@0.3.7
0.9.0
Minor Changes
-
8106c9528: The scaffolder has been updated to support the newv1beta2template schema which allows for custom template actions!See documentation for more information how to create and register new template actions.
Breaking changes
The backend scaffolder plugin now needs a
UrlReaderwhich can be pulled from the PluginEnvironment.The following change is required in
backend/src/plugins/scaffolder.tsexport default async function createPlugin({ logger, config, database, + reader, }: PluginEnvironment): Promise<Router> { // omitted code return await createRouter({ preparers, templaters, publishers, logger, config, dockerClient, database, catalogClient, + reader, }); -
96ccc8f69: Removed support for deprecated publisher auth configuration within thescaffolderconfiguration block, such asscaffolder.github.token. Access should instead be configured throughintegrationsconfiguration.For example, replace the following configuration in
app-config.yamlscaffolder: github: token: my-tokenwith
integrations: github: - host: github.com token: my-token
Patch Changes
12d8f27a6: Move logic for constructing the template form to the backend, using a new./parameter-schemaendpoint that returns the form schema for a given template.12d8f27a6: Add versionbackstage.io/v1beta2schema for Template entities.f31b76b44: Consider both authentication methods for bothonpremandcloudBitBucketf43192207: remove usage of res.send() for res.json() and res.end() to ensure content types are more consistently application/json on backend responses and error casesd0ed25196: Fixed file path resolution for templates with a file location- Updated dependencies [
12d8f27a6] - Updated dependencies [
497859088] - Updated dependencies [
8adb48df4]- @backstage/catalog-model@0.7.3
- @backstage/backend-common@0.5.5
0.8.0
Minor Changes
-
a5f42cf66: # Stateless scaffoldingThe scaffolder has been redesigned to be horizontally scalable and to persistently store task state and execution logs in the database.
Each scaffolder task is given a unique task ID which is persisted in the database. Tasks are then picked up by a
TaskWorkerwhich performs the scaffolding steps. Execution logs are also persisted in the database meaning you can now refresh the scaffolder task status page without losing information.The task status page is now dynamically created based on the step information stored in the database. This allows for custom steps to be displayed once the next version of the scaffolder template schema is available.
The task page is updated to display links to both the git repository and to the newly created catalog entity.
Component registration has moved from the frontend into a separate registration step executed by the
TaskWorker. This requires that aCatalogClientis passed to the scaffolder backend instead of the oldCatalogEntityClient.Make sure to update
plugins/scaffolder.tsimport { CookieCutter, createRouter, Preparers, Publishers, CreateReactAppTemplater, Templaters, - CatalogEntityClient, } from '@backstage/plugin-scaffolder-backend'; +import { CatalogClient } from '@backstage/catalog-client'; const discovery = SingleHostDiscovery.fromConfig(config); -const entityClient = new CatalogEntityClient({ discovery }); +const catalogClient = new CatalogClient({ discoveryApi: discovery }) return await createRouter({ preparers, templaters, publishers, logger, config, dockerClient, - entityClient, database, + catalogClient, });As well as adding the
@backstage/catalog-clientpackages as a dependency of your backend package.
Patch Changes
- Updated dependencies [
bad21a085] - Updated dependencies [
a1f5e6545]- @backstage/catalog-model@0.7.2
- @backstage/config@0.1.3
0.7.1
Patch Changes
edbc27bfd: Added githubApp authentication to the scaffolder-backend pluginfb28da212: Switched to using'x-access-token'for authenticating Git over HTTPS towards GitHub.0ada34a0f: Minor typo in migration29c8bcc53: Fixed thepreparestep for when using local templates that were added to the catalog using thefile:target configuration. No moreEPERM: operation not permittederror messages.a341a8716: Fix parsing of the path to default to empty string not undefined if git-url-parse throws something we don't expect. Fixes the errorThe "path" argument must be of type string.when preparing.- Updated dependencies [
16fb1d03a] - Updated dependencies [
491f3a0ec] - Updated dependencies [
491f3a0ec] - Updated dependencies [
434b4e81a] - Updated dependencies [
fb28da212]- @backstage/backend-common@0.5.4
- @backstage/integration@0.5.0
0.7.0
Minor Changes
-
615103a63: Introducedv2Scaffolder REST API, which uses an implementation that is database backed, making the scaffolder instances stateless. ThecreateRouterfunction now requires aPluginDatabaseManagerinstance to be passed in, commonly available asdatabasein the plugin environment in the backend.This API should be considered unstable until used by the scaffolder frontend.
Patch Changes
6ed2b47d6: Include Backstage identity token in requests to backend plugins.ffffea8e6: Minor updates to reflect the changes in@backstage/integrationthat made the fieldsapiBaseUrlandapiUrlmandatory.- Updated dependencies [
6ed2b47d6] - Updated dependencies [
ffffea8e6] - Updated dependencies [
82b2c11b6] - Updated dependencies [
965e200c6] - Updated dependencies [
ffffea8e6] - Updated dependencies [
72b96e880] - Updated dependencies [
5a5163519]- @backstage/catalog-client@0.3.6
- @backstage/backend-common@0.5.3
- @backstage/integration@0.4.0
0.6.0
Minor Changes
-
cdea0baf1: The scaffolder is updated to generate a unique workspace directory inside the temp folder. This directory is cleaned up by the job processor after each run.The prepare/template/publish steps have been refactored to operate on known directories,
template/andresult/, inside the temporary workspace path.Updated preparers to accept the template url instead of the entire template. This is done primarily to allow for backwards compatibility between v1 and v2 scaffolder templates.
Fixes broken GitHub actions templating in the Create React App template.
For those with custom preparers, templates, or publishers
The preparer interface has changed, the prepare method now only takes a single argument, and doesn't return anything. As part of this change the preparers were refactored to accept a URL pointing to the target directory, rather than computing that from the template entity.
The
workingDirectoryoption was also removed, and replaced with aworkspacePathoption. The difference between the two is thatworkingDirectorywas a place for the preparer to create temporary directories, while theworkspacePathis the specific folder were the entire templating process for a single template job takes place. Instead of returning a path to the folder were the prepared contents were placed, the contents are put at the<workspacePath>/templatepath.type PreparerOptions = { - workingDirectory?: string; + /** + * Full URL to the directory containg template data + */ + url: string; + /** + * The workspace path that will eventually be the the root of the new repo + */ + workspacePath: string; logger: Logger; }; -prepare(template: TemplateEntityV1alpha1, opts?: PreparerOptions): Promise<string> +prepare(opts: PreparerOptions): Promise<void>;Instead of returning a path to the folder were the templaters contents were placed, the contents are put at the
<workspacePath>/resultpath. All templaters now also expect the source template to be present in thetemplatedirectory within theworkspacePath.export type TemplaterRunOptions = { - directory: string; + workspacePath: string; values: TemplaterValues; logStream?: Writable; dockerClient: Docker; }; -public async run(options: TemplaterRunOptions): Promise<TemplaterRunResult> +public async run(options: TemplaterRunOptions): Promise<void>Just like the preparer and templaters, the publishers have also switched to using
workspacePath. The root of the new repo is expected to be located at<workspacePath>/result.export type PublisherOptions = { values: TemplaterValues; - directory: string; + workspacePath: string; logger: Logger; };
Patch Changes
-
a26668913: Attempt to fix windows test errors in master -
529d16d27: # Repo visibility for GitLab and BitBucket reposNOTE: This changes default repo visibility from
privatetopublicfor GitLab and BitBucket which is consistent with the GitHub default. If you were counting onprivatevisibility, you'll need to update your scaffolder config to useprivate.This adds repo visibility feature parity with GitHub for GitLab and BitBucket.
To configure the repo visibility, set scaffolder.type.visibility as in this example:
scaffolder: github: visibility: private # 'public' or 'internal' or 'private' (default is 'public') gitlab: visibility: public # 'public' or 'internal' or 'private' (default is 'public') bitbucket: visibility: public # 'public' or 'private' (default is 'public') -
Updated dependencies [
c4abcdb60] -
Updated dependencies [
2430ee7c2] -
Updated dependencies [
6e612ce25] -
Updated dependencies [
025e122c3] -
Updated dependencies [
064c513e1] -
Updated dependencies [
7881f2117] -
Updated dependencies [
3149bfe63] -
Updated dependencies [
2e62aea6f] -
Updated dependencies [
11cb5ef94]- @backstage/integration@0.3.2
- @backstage/backend-common@0.5.2
- @backstage/catalog-model@0.7.1
0.5.2
Patch Changes
-
26a3a6cf0: Honor the branch ref in the url when cloning.This fixes a bug in the scaffolder prepare stage where a non-default branch was specified in the scaffolder URL but the default branch was cloned. For example, even though the
otherbranch is specified in this example, themasterbranch was actually cloned:catalog: locations: - type: url target: https://github.com/backstage/backstage/blob/other/plugins/scaffolder-backend/sample-templates/docs-template/template.yamlThis also fixes a 404 in the prepare stage for GitLab URLs.
-
9dd057662: Upgrade git-url-parse to v11.4.4 which fixes parsing an Azure DevOps branch ref. -
Updated dependencies [
26a3a6cf0] -
Updated dependencies [
664dd08c9] -
Updated dependencies [
6800da78d] -
Updated dependencies [
9dd057662]- @backstage/backend-common@0.5.1
- @backstage/integration@0.3.1
0.5.1
Patch Changes
0ea002378: Fixing issues with templating and full URL's asstorePath's
0.5.0
Minor Changes
-
ed6baab66: - Deprecating thescaffolder.${provider}.tokenauth duplication and favoringintegrations.${provider}instead. If you receive deprecation warnings your config should change like the following:scaffolder: github: token: $env: GITHUB_TOKEN visibility: publicTo something that looks like this:
integration: github: - host: github.com token: $env: GITHUB_TOKEN scaffolder: github: visibility: publicYou can also configure multiple different hosts under the
integrationconfig like the following:integration: github: - host: github.com token: $env: GITHUB_TOKEN - host: ghe.mycompany.com token: $env: GITHUB_ENTERPRISE_TOKENThis of course is the case for all the providers respectively.
-
Adding support for cross provider scaffolding, you can now create repositories in for example Bitbucket using a template residing in GitHub.
-
Fix GitLab scaffolding so that it returns a
catalogInfoUrlwhich automatically imports the project into the catalog. -
The
Store Pathfield on thescaffolderfrontend has now changed so that you require the full URL to the desired destination repository.
backstage/new-repositorywould becomehttps://github.com/backstage/new-repositoryif provider was GitHub for example. -
Patch Changes
- Updated dependencies [
def2307f3] - Updated dependencies [
0b135e7e0] - Updated dependencies [
294a70cab] - Updated dependencies [
fa8ba330a] - Updated dependencies [
0ea032763] - Updated dependencies [
5345a1f98] - Updated dependencies [
ed6baab66] - Updated dependencies [
09a370426] - Updated dependencies [
a93f42213]- @backstage/catalog-model@0.7.0
- @backstage/backend-common@0.5.0
- @backstage/integration@0.3.0
0.4.1
Patch Changes
-
94fdf4955: Get rid of all usages of @octokit/types, and bump the rest of the octokit dependencies to the latest version -
cc068c0d6: Bump the gitbeaker dependencies to 28.x.To update your own installation, go through the
package.jsonfiles of all of your packages, and ensure that all dependencies on@gitbeaker/nodeor@gitbeaker/coreare at version^28.0.2. Then runyarn installat the root of your repo. -
711ba55a2: Export all preparers and publishers properly -
Updated dependencies [
466354aaa] -
Updated dependencies [
f3b064e1c] -
Updated dependencies [
abbee6fff] -
Updated dependencies [
147fadcb9]- @backstage/integration@0.2.0
- @backstage/catalog-model@0.6.1
- @backstage/backend-common@0.4.3
0.4.0
Minor Changes
5eb8c9b9e: Fix GitLab scaffolder publisher
Patch Changes
7e3451700: bug(scaffolder): Ignore the .git folder when adding dot-files to the index
0.3.7
Patch Changes
37a5244ef: Add scaffolding support for Bitbucket Cloud and Server.00042e73c: Moving the Git actions to isomorphic-git instead of the node binding version of nodegit9efbc5585: Add config schema for Bitbucket scaffolder- Updated dependencies [
5ecd50f8a] - Updated dependencies [
00042e73c] - Updated dependencies [
0829ff126] - Updated dependencies [
036a84373]- @backstage/backend-common@0.4.2
- @backstage/integration@0.1.5
0.3.6
Patch Changes
19554f6d6: Added GitHub Actions for Create React App, and allow better imports of files inside a module when they're exposed usingfilesinpackage.json33a82a713: GitLab preparer uses the right token (primarily the same one as the publisher, falling back to the integrations token)aed8f7f12: Clearer error message when preparer or publisher type can't be determined.
0.3.5
Patch Changes
94c65a9d4: Added configuration schema for the commonly used properties- Updated dependencies [
c911061b7] - Updated dependencies [
1d1c2860f] - Updated dependencies [
0e6298f7e] - Updated dependencies [
4eafdec4a] - Updated dependencies [
ac3560b42]- @backstage/catalog-model@0.6.0
- @backstage/backend-common@0.4.1
0.3.4
Patch Changes
1e22f8e0b: Unifydockerodelibrary and type dependency versions- Updated dependencies [
38e24db00] - Updated dependencies [
e3bd9fc2f] - Updated dependencies [
12bbd748c] - Updated dependencies [
83b6e0c1f] - Updated dependencies [
e3bd9fc2f]- @backstage/backend-common@0.4.0
- @backstage/config@0.1.2
- @backstage/catalog-model@0.5.0
0.3.3
Patch Changes
- Updated dependencies [
612368274] - Updated dependencies [
08835a61d] - Updated dependencies [
a9fd599f7] - Updated dependencies [
bcc211a08]- @backstage/backend-common@0.3.3
- @backstage/catalog-model@0.4.0
0.3.2
Patch Changes
ef2831dde: Move constructing the catalog-info.yaml URL for scaffolded components to the publishers5a1d8dca3: Fix React entity YAML filename to new standard- Updated dependencies [
1166fcc36] - Updated dependencies [
bff3305aa] - Updated dependencies [
1185919f3] - Updated dependencies [
b47dce06f]- @backstage/catalog-model@0.3.0
- @backstage/backend-common@0.3.1
0.3.1
Patch Changes
d33f5157c: Extracted pushToRemote function for reuse between publishers- Updated dependencies [
1722cb53c] - Updated dependencies [
1722cb53c] - Updated dependencies [
7b37e6834] - Updated dependencies [
8e2effb53]- @backstage/backend-common@0.3.0
0.3.0
Minor Changes
-
59166e5ec:createRouterof scaffolder backend will now require additional option asentityClientwhich could be generated byCatalogEntityClientinplugin-scaffolder-backendpackage. Here is example to generateentityClient.import { CatalogEntityClient } from '@backstage/plugin-scaffolder-backend'; import { SingleHostDiscovery } from '@backstage/backend-common'; const discovery = SingleHostDiscovery.fromConfig(config); const entityClient = new CatalogEntityClient({ discovery });- Scaffolder's API
/v1/jobswill accepttemplateNameinstead oftemplateEntity.
- Scaffolder's API
Patch Changes
- Updated dependencies [
33b7300eb]- @backstage/backend-common@0.2.1
0.2.0
Minor Changes
-
3e254503d: Add Azure DevOps support to the scaffolder backendThis adds support for Azure DevOps to the scaffolder (preparer & publisher). I thought I should get this in there now since #2426 has been merged. I had a previous PR with only the preparer but I closed that in favor of this one.
I stayed with the 'azure/api' structure but I guess we should try and go the same way as with GitHub here #2501
Patch Changes
-
0c370c979: Update SSR template to pass CI -
991a950e0: Added .fromConfig static factories for Preparers and Publishers + read integrations config to support url location types -
c926765a2: Allow templates to be located on non-default branch -
6840a68df: Add authentication token to Scaffolder GitHub Preparer -
1c8c43756: The newscaffolder.github.baseUrlconfig property allows to specify a custom base url for GitHub Enterprise instances -
5e4551e3a: Added support for configuring the working directory of the Scaffolder:backend: workingDirectory: /some-dir # Use this to configure a working directory for the scaffolder, defaults to the OS temp-dir -
e3d063ffa: Introduce PreparerOptions for PreparerBase -
Updated dependencies [
3a4236570] -
Updated dependencies [
e0be86b6f] -
Updated dependencies [
f70a52868] -
Updated dependencies [
12b5fe940] -
Updated dependencies [
5249594c5] -
Updated dependencies [
56e4eb589] -
Updated dependencies [
e37c0a005] -
Updated dependencies [
a768a07fb] -
Updated dependencies [
f00ca3cb8] -
Updated dependencies [
6579769df] -
Updated dependencies [
5adfc005e] -
Updated dependencies [
8c2b76e45] -
Updated dependencies [
440a17b39] -
Updated dependencies [
fa56f4615] -
Updated dependencies [
8afce088a] -
Updated dependencies [
b3d57961c] -
Updated dependencies [
7bbeb049f]- @backstage/catalog-model@0.2.0
- @backstage/backend-common@0.2.0