-
Notifications
You must be signed in to change notification settings - Fork 151
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(orchestrator): backport all orchestrator commits since release 1.2
- Loading branch information
Showing
154 changed files
with
7,280 additions
and
5,890 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
--- | ||
"@janus-idp/backstage-plugin-orchestrator-form-react": patch | ||
"@janus-idp/backstage-plugin-orchestrator-form-api": patch | ||
"@janus-idp/backstage-plugin-orchestrator-backend": patch | ||
"@janus-idp/backstage-plugin-orchestrator": patch | ||
--- | ||
|
||
backport all orchestrator commits since release 1.2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
# comma delimited path of files to exclude from copy/paste duplicate checking | ||
sonar.cpd.exclusions=packages/cli/src/lib/bundler/scalprumConfig.ts | ||
sonar.cpd.exclusions=plugins/orchestrator-common/src/generated/**,packages/cli/src/lib/bundler/scalprumConfig.ts |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,61 +1,9 @@ | ||
import { | ||
createServiceBuilder, | ||
ServerTokenManager, | ||
UrlReader, | ||
} from '@backstage/backend-common'; | ||
import { DiscoveryService, LoggerService } from '@backstage/backend-plugin-api'; | ||
import { PluginTaskScheduler } from '@backstage/backend-tasks'; | ||
import { CatalogApi } from '@backstage/catalog-client'; | ||
import { Config } from '@backstage/config'; | ||
import { ServerPermissionClient } from '@backstage/plugin-permission-node'; | ||
import { createBackend } from '@backstage/backend-defaults'; | ||
|
||
import { Server } from 'http'; | ||
import { orchestratorPlugin } from '../src/plugin'; | ||
|
||
import { createRouter } from '../src/routerWrapper'; | ||
const backend = createBackend(); | ||
|
||
export interface ServerOptions { | ||
port: number; | ||
enableCors: boolean; | ||
logger: LoggerService; | ||
config: Config; | ||
discovery: DiscoveryService; | ||
catalogApi: CatalogApi; | ||
urlReader: UrlReader; | ||
scheduler: PluginTaskScheduler; | ||
} | ||
backend.add(orchestratorPlugin); | ||
|
||
export async function startStandaloneServer( | ||
options: ServerOptions, | ||
): Promise<Server> { | ||
const logger = options.logger.child({ service: 'orchestrator-backend' }); | ||
logger.debug('Starting application server...'); | ||
|
||
const permissions = ServerPermissionClient.fromConfig(options.config, { | ||
discovery: options.discovery, | ||
tokenManager: ServerTokenManager.noop(), | ||
}); | ||
|
||
const router = await createRouter({ | ||
logger, | ||
config: options.config, | ||
discovery: options.discovery, | ||
catalogApi: options.catalogApi, | ||
urlReader: options.urlReader, | ||
scheduler: options.scheduler, | ||
permissions: permissions, | ||
}); | ||
|
||
let service = createServiceBuilder(module) | ||
.setPort(options.port) | ||
.addRouter('/orchestrator', router); | ||
if (options.enableCors) { | ||
service = service.enableCors({ origin: 'http://localhost:3000' }); | ||
} | ||
|
||
return await service.start().catch(err => { | ||
logger.error(err); | ||
process.exit(1); | ||
}); | ||
} | ||
|
||
module.hot?.accept(); | ||
backend.start(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.