fixed interface for hooklib and example repos

This commit is contained in:
Nikola Jokic
2022-06-08 13:25:45 +02:00
parent dd5dfb3e48
commit 88b7b19db7
5 changed files with 8 additions and 7 deletions

View File

@@ -5,7 +5,7 @@
"args": { "args": {
"container": { "container": {
"image": "node:14.16", "image": "node:14.16",
"workingDirectory": "/__w/thboop-test2/thboop-test2", "workingDirectory": "/__w/repo/repo",
"createOptions": "--cpus 1", "createOptions": "--cpus 1",
"environmentVariables": { "environmentVariables": {
"NODE_ENV": "development" "NODE_ENV": "development"

View File

@@ -16,7 +16,7 @@
"echo \"hello world2\"" "echo \"hello world2\""
], ],
"entryPoint": "bash", "entryPoint": "bash",
"workingDirectory": "/__w/thboop-test2/thboop-test2", "workingDirectory": "/__w/repo/repo",
"createOptions": "--cpus 1", "createOptions": "--cpus 1",
"environmentVariables": { "environmentVariables": {
"NODE_ENV": "development" "NODE_ENV": "development"

View File

@@ -21,6 +21,6 @@
"/foo/bar", "/foo/bar",
"bar/foo" "bar/foo"
], ],
"workingDirectory": "/__w/thboop-test2/thboop-test2" "workingDirectory": "/__w/repo/repo"
} }
} }

View File

@@ -34,6 +34,7 @@ export interface ContainerInfo {
createOptions?: string createOptions?: string
environmentVariables?: { [key: string]: string } environmentVariables?: { [key: string]: string }
userMountVolumes?: Mount[] userMountVolumes?: Mount[]
systemMountVolumes?: Mount[]
registry?: Registry registry?: Registry
portMappings?: string[] portMappings?: string[]
} }

View File

@@ -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 fs from 'fs'
import * as path from 'path'
import { cleanupJob, prepareJob, runScriptStep } from '../src/hooks'
import { TestHelper } from './test-setup'
jest.useRealTimers() jest.useRealTimers()
@@ -45,7 +45,7 @@ describe('Run script step', () => {
NODE_ENV: 'development' NODE_ENV: 'development'
}, },
prependPath: ['/foo/bar', 'bar/foo'], prependPath: ['/foo/bar', 'bar/foo'],
workingDirectory: '/__w/thboop-test2/thboop-test2' workingDirectory: '/__w/repo/repo'
} }
const state = { const state = {
jobPod: prepareJobOutputData.state.jobPod jobPod: prepareJobOutputData.state.jobPod