Move working directory config to backend
This commit is contained in:
+1
-1
@@ -16,6 +16,7 @@ backend:
|
||||
credentials: true
|
||||
csp:
|
||||
connect-src: ["'self'", 'http:', 'https:']
|
||||
# workingDirectory: /tmp # Use this to configure a working direcotry for the scaffolder, defaults to the OS temp-dir
|
||||
|
||||
# See README.md in the proxy-backend plugin for information on the configuration format
|
||||
proxy:
|
||||
@@ -155,7 +156,6 @@ catalog:
|
||||
target: https://github.com/spotify/backstage/blob/master/packages/catalog-model/examples/acme-corp.yaml
|
||||
|
||||
scaffolder:
|
||||
# workingDirectory: /tmp # Use this to configure a working direcotry for the scaffolder, defaults to the OS temp-dir
|
||||
github:
|
||||
token:
|
||||
$env: GITHUB_TOKEN
|
||||
|
||||
@@ -38,6 +38,7 @@ backend:
|
||||
#ca: # if you have a CA file and want to verify it you can uncomment this section
|
||||
# $file: <file-path>/ca/server.crt
|
||||
{{/if}}
|
||||
# workingDirectory: /tmp # Use this to configure a working direcotry for the scaffolder, defaults to the OS temp-dir
|
||||
|
||||
integrations:
|
||||
github:
|
||||
@@ -69,7 +70,6 @@ auth:
|
||||
providers: {}
|
||||
|
||||
scaffolder:
|
||||
# workingDirectory: /tmp # Use this to configure a working direcotry for the scaffolder, defaults to the OS temp-dir
|
||||
github:
|
||||
token:
|
||||
$env: GITHUB_TOKEN
|
||||
|
||||
@@ -54,7 +54,7 @@ describe('createRouter - working directory', () => {
|
||||
const workDirConfig = (path: string) => ({
|
||||
context: '',
|
||||
data: {
|
||||
scaffolder: {
|
||||
backend: {
|
||||
workingDirectory: path,
|
||||
},
|
||||
},
|
||||
|
||||
@@ -61,7 +61,7 @@ export async function createRouter(
|
||||
const jobProcessor = new JobProcessor();
|
||||
|
||||
const workingDirectory =
|
||||
config.getOptionalString('scaffolder.workingDirectory') ?? os.tmpdir();
|
||||
config.getOptionalString('backend.workingDirectory') ?? os.tmpdir();
|
||||
try {
|
||||
// Check if working directory exists and is writable
|
||||
await fs.promises.access(
|
||||
|
||||
Reference in New Issue
Block a user