From 88b7b19db790f4e9cd8d05cedf698f22951b58ee Mon Sep 17 00:00:00 2001 From: Nikola Jokic Date: Wed, 8 Jun 2022 13:25:45 +0200 Subject: [PATCH] fixed interface for hooklib and example repos --- examples/prepare-job.json | 2 +- examples/run-container-step.json | 2 +- examples/run-script-step.json | 2 +- packages/hooklib/src/interfaces.ts | 1 + packages/k8s/tests/run-script-step-test.ts | 8 ++++---- 5 files changed, 8 insertions(+), 7 deletions(-) diff --git a/examples/prepare-job.json b/examples/prepare-job.json index abc9474..cf6f838 100644 --- a/examples/prepare-job.json +++ b/examples/prepare-job.json @@ -5,7 +5,7 @@ "args": { "container": { "image": "node:14.16", - "workingDirectory": "/__w/thboop-test2/thboop-test2", + "workingDirectory": "/__w/repo/repo", "createOptions": "--cpus 1", "environmentVariables": { "NODE_ENV": "development" diff --git a/examples/run-container-step.json b/examples/run-container-step.json index cf3cf97..7a7cfac 100644 --- a/examples/run-container-step.json +++ b/examples/run-container-step.json @@ -16,7 +16,7 @@ "echo \"hello world2\"" ], "entryPoint": "bash", - "workingDirectory": "/__w/thboop-test2/thboop-test2", + "workingDirectory": "/__w/repo/repo", "createOptions": "--cpus 1", "environmentVariables": { "NODE_ENV": "development" diff --git a/examples/run-script-step.json b/examples/run-script-step.json index 2b7aebf..1b57dc1 100644 --- a/examples/run-script-step.json +++ b/examples/run-script-step.json @@ -21,6 +21,6 @@ "/foo/bar", "bar/foo" ], - "workingDirectory": "/__w/thboop-test2/thboop-test2" + "workingDirectory": "/__w/repo/repo" } } \ No newline at end of file diff --git a/packages/hooklib/src/interfaces.ts b/packages/hooklib/src/interfaces.ts index f29dcbd..53e20c1 100644 --- a/packages/hooklib/src/interfaces.ts +++ b/packages/hooklib/src/interfaces.ts @@ -34,6 +34,7 @@ export interface ContainerInfo { createOptions?: string environmentVariables?: { [key: string]: string } userMountVolumes?: Mount[] + systemMountVolumes?: Mount[] registry?: Registry portMappings?: string[] } diff --git a/packages/k8s/tests/run-script-step-test.ts b/packages/k8s/tests/run-script-step-test.ts index 64c05b7..dfa6edb 100644 --- a/packages/k8s/tests/run-script-step-test.ts +++ b/packages/k8s/tests/run-script-step-test.ts @@ -1,7 +1,7 @@ -import { prepareJob, cleanupJob, runScriptStep } from '../src/hooks' -import { TestHelper } from './test-setup' -import * as path from 'path' import * as fs from 'fs' +import * as path from 'path' +import { cleanupJob, prepareJob, runScriptStep } from '../src/hooks' +import { TestHelper } from './test-setup' jest.useRealTimers() @@ -45,7 +45,7 @@ describe('Run script step', () => { NODE_ENV: 'development' }, prependPath: ['/foo/bar', 'bar/foo'], - workingDirectory: '/__w/thboop-test2/thboop-test2' + workingDirectory: '/__w/repo/repo' } const state = { jobPod: prepareJobOutputData.state.jobPod