Commit Graph

647 Commits

Author SHA1 Message Date
Erik Larsson 8b4f7e42ae fix: forward auth on scaffolder backend reqeuests
Signed-off-by: Erik Larsson <erik.larsson@schibsted.com>
2021-03-16 01:31:48 +01:00
Fredrik Adelöw 8686eb38cf Introduce the @backstage/errors package.
Encode thrown errors in the backend as a JSON payload using a facility in that package, and render helpful frontend displays of those errors.

Signed-off-by: Fredrik Adelöw <freben@gmail.com>
2021-03-11 14:31:21 +01:00
github-actions[bot] 0e120c5c66 Version Packages
Signed-off-by: Fredrik Adelöw <freben@gmail.com>
2021-03-11 13:45:44 +01:00
Fredrik Adelöw cbb85fd86e Merge pull request #4904 from backstage/freben/no-dots
Remove all dot-folder imports everywhere
2021-03-10 16:47:13 +01:00
Johan Haals b8f86caa7a Merge pull request #4869 from backstage/mob/actions-list
Scaffolder: Add page displaying available actions
2021-03-10 14:47:46 +01:00
Johan Haals 843078a5d6 Update description to be consistent
Signed-off-by: Johan Haals <johan.haals@gmail.com>
2021-03-10 14:29:17 +01:00
Johan Haals 3848bc1cfa Throw error with status included
Signed-off-by: Johan Haals <johan.haals@gmail.com>
2021-03-10 14:17:27 +01:00
Fredrik Adelöw 702b837b8b Remove all dot-folder imports everywhere
We aren't supposed to import from '.' or '../..' etc; point to the actual node being imported instead. I did allow e.g. '../../bigfolder' however. Going all the way to the individual file could be done too, but is a matter of taste perhaps.

Also ran Organize Imports on all the touched files :)

No changeset since there are no functional changes at all - only the imports changed

Signed-off-by: Fredrik Adelöw <freben@gmail.com>
2021-03-10 13:43:59 +01:00
Johan Haals 12cdd556e7 Update plugins/scaffolder-backend/src/scaffolder/stages/publish/github.ts
Signed-off-by: Johan Haals johan.haals@gmail.com

Co-authored-by: Adam Harvey <adam.harvey@dxc.com>
Signed-off-by: Johan Haals <johan.haals@gmail.com>
2021-03-09 15:42:03 +01:00
Johan Haals 2e57922dea scaffolder: Improve GitHub publishers permission update error message
Signed-off-by: Johan Haals <johan.haals@gmail.com>
2021-03-09 14:58:14 +01:00
Johan Haals cc8072158b format
Signed-off-by: Johan Haals <johan.haals@gmail.com>
2021-03-09 12:45:51 +01:00
Johan Haals eaa4fc82ad Update plugins/scaffolder-backend/src/scaffolder/actions/builtin/publish/azure.ts
Signed-off-by: Johan Haals <johan.haals@gmail.com>

Co-authored-by: Fredrik Adelöw <freben@gmail.com>
2021-03-09 11:21:40 +01:00
Johan Haals 83ab18b4a4 Update plugins/scaffolder-backend/src/scaffolder/actions/builtin/publish/bitbucket.ts
Signed-off-by: Johan Haals <johan.haals@gmail.com>

Co-authored-by: Fredrik Adelöw <freben@gmail.com>
2021-03-09 11:21:11 +01:00
Johan Haals 269dba9ff7 Update plugins/scaffolder-backend/src/scaffolder/actions/builtin/catalog/register.ts
Signed-off-by: Johan Haals <johan.haals@gmail.com>

Co-authored-by: Fredrik Adelöw <freben@gmail.com>
2021-03-09 11:20:53 +01:00
Himanshu Mishra 38a8734d89 Merge pull request #4744 from backstage/orkohunter/move-runDockerContainer 2021-03-09 10:47:26 +01:00
Johan Haals 26e4033070 format
Signed-off-by: Johan Haals <johan.haals@gmail.com>
2021-03-09 09:24:05 +01:00
Johan Haals 4c43faa51a Update plugins/scaffolder-backend/src/scaffolder/actions/builtin/fetch/cookiecutter.ts
Signed-off-by: Johan Haals <johan.haals@gmail.com>

Co-authored-by: Fredrik Adelöw <freben@gmail.com>
2021-03-09 09:03:57 +01:00
Johan Haals 955ae4556b Update plugins/scaffolder-backend/src/scaffolder/actions/builtin/publish/gitlab.ts
Signed-off-by: Johan Haals <johan.haals@gmail.com>

Co-authored-by: Fredrik Adelöw <freben@gmail.com>
2021-03-09 09:02:37 +01:00
Johan Haals 3126fe1d05 Update plugins/scaffolder-backend/src/scaffolder/actions/builtin/fetch/plain.ts
Signed-off-by: Johan Haals <johan.haals@gmail.com>

Co-authored-by: Fredrik Adelöw <freben@gmail.com>
2021-03-09 09:02:26 +01:00
Himanshu Mishra 4d9d38d2de backend-common: Update tests with new envVars format
Signed-off-by: Himanshu Mishra <himanshu@orkohunter.net>
2021-03-08 16:49:29 +01:00
Johan Haals d36c697538 fix tests
Signed-off-by: Johan Haals <johan.haals@gmail.com>
2021-03-08 14:49:29 +01:00
Johan Haals 7b66e07116 Add description to scaffolder actions
Signed-off-by: Johan Haals <johan.haals@gmail.com>
2021-03-08 14:07:38 +01:00
Himanshu Mishra 3f2a0efe01 backend-common: Use Record<string, string> for envVars in runDockerContainer
Signed-off-by: Himanshu Mishra <himanshu@orkohunter.net>
2021-03-08 14:00:17 +01:00
dependabot[bot] 63887ea84d chore(deps-dev): bump @types/node from 12.12.58 to 14.14.32
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 12.12.58 to 14.14.32.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Fredrik Adelöw <freben@gmail.com>
2021-03-08 13:19:08 +01:00
Himanshu Mishra c0c26244db 1. Use plain Record instead of Map
2. Call fs.realpath inside the utility function

Signed-off-by: Himanshu Mishra <himanshu@orkohunter.net>
2021-03-08 12:44:11 +01:00
dependabot[bot] 7616988312 chore(deps): bump knex from 0.21.18 to 0.95.1
Bumps [knex](https://github.com/knex/knex) from 0.21.18 to 0.95.1.
- [Release notes](https://github.com/knex/knex/releases)
- [Changelog](https://github.com/knex/knex/blob/master/CHANGELOG.md)
- [Commits](https://github.com/knex/knex/commits)

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Fredrik Adelöw <freben@gmail.com>
2021-03-08 10:26:45 +01:00
Himanshu Mishra 29b64038e1 Scaffolder: Update CRA templater with new runDockerContainer format
Signed-off-by: Himanshu Mishra <himanshu@orkohunter.net>
2021-03-06 21:27:00 +01:00
Himanshu Mishra 68575f3689 Update techdocs/scaffolder with new function parameters of runDockerContainer
Signed-off-by: Himanshu Mishra <himanshu@orkohunter.net>
2021-03-06 21:27:00 +01:00
Himanshu Mishra a37a4d1a4c Scaffolder/Tests: Fix by mocking @backstage/backend-common
Signed-off-by: Himanshu Mishra <himanshu@orkohunter.net>
2021-03-06 21:26:59 +01:00
Himanshu Mishra e9b7db7b29 backend-common: Add runDockerContainer shared by Scaffolder and TechDocs
Signed-off-by: Himanshu Mishra <himanshu@orkohunter.net>
2021-03-06 21:26:59 +01:00
Fredrik Adelöw 0b42fff222 add parseLocationReference/stringifyLocationReference
Signed-off-by: Fredrik Adelöw <freben@gmail.com>
2021-03-06 15:46:44 +01:00
Johan Haals a195fd752f Generate documentation for registered actions
Signed-off-by: Johan Haals <johan.haals@gmail.com>
2021-03-05 14:54:28 +01:00
Johan Haals c3eb4917fb Add input template test
Signed-off-by: Johan Haals <johan.haals@gmail.com>
2021-03-05 10:28:13 +01:00
Johan Haals c20bc8abc4 Don't json parse undefined input
Signed-off-by: Johan Haals <johan.haals@gmail.com>
2021-03-05 09:54:27 +01:00
Johan Haals 6e435e9a08 Update tests
Signed-off-by: Johan Haals <johan.haals@gmail.com>
2021-03-05 09:48:37 +01:00
Johan Haals 561fd1645b chore: fix expect
Signed-off-by: Johan Haals <johan.haals@gmail.com>
2021-03-04 15:27:04 +01:00
Johan Haals f3ba1fc463 Add TaskWorker test
Signed-off-by: Johan Haals <johan.haals@gmail.com>
2021-03-04 15:27:04 +01:00
github-actions[bot] ff2ab4fade Version Packages 2021-03-04 13:11:10 +00:00
blam eed2656f12 chore: updating scaffolder v2 template
Signed-off-by: blam <ben@blam.sh>
2021-03-04 10:54:34 +01:00
Patrik Oldsberg 60dcadeef6 scaffolder-backend: fix action tests on windows
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
2021-03-02 20:56:40 +01:00
Johan Haals 66e09c212f Merge pull request #4718 from backstage/mob/scaffolder-schema-v2
scaffolder: Introduce support for custom actions
2021-03-02 10:54:47 +01:00
Johan Haals 8c1adc2404 Reset mock after each test
Co-authored-by: Patrik Oldsberg <poldsberg@gmail.com>
Signed-off-by: Johan Haals <johan.haals@gmail.com>
2021-03-02 10:22:05 +01:00
Johan Haals 41b044c81a chore: use interface type instead of implementation
Signed-off-by: Johan Haals <johan.haals@gmail.com>
2021-03-02 10:22:03 +01:00
Johan Haals e2d3b6ada1 chore: set test entity kind to Component
Signed-off-by: Johan Haals <johan.haals@gmail.com>
2021-03-02 10:22:02 +01:00
Johan Haals bd630612b7 chore: remove redundant if statement
Signed-off-by: Johan Haals <johan.haals@gmail.com>
2021-03-02 10:22:02 +01:00
Johan Haals 4061baea23 Update plugins/scaffolder-backend/src/scaffolder/actions/builtin/publish/azure.ts
Co-authored-by: Fredrik Adelöw <freben@gmail.com>
Signed-off-by: Johan Haals <johan.haals@gmail.com>
2021-03-02 10:22:02 +01:00
Johan Haals 053d6268ec chore: remove dev comments
Signed-off-by: Johan Haals <johan.haals@gmail.com>
2021-03-02 10:22:02 +01:00
Johan Haals 43ff002754 Restructure demo template
Signed-off-by: Johan Haals <johan.haals@gmail.com>
2021-03-02 10:22:01 +01:00
Johan Haals 4b0b815372 cleanup test template
Signed-off-by: Johan Haals <johan.haals@gmail.com>
2021-03-02 10:22:01 +01:00
Johan Haals e39a1d5d37 Add fetch helper tests
Signed-off-by: Johan Haals <johan.haals@gmail.com>
2021-03-02 10:22:01 +01:00