generated from actions/typescript-action
-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #65 from stuartleeks/sl/align-users
Align UID/GID between host/container
- Loading branch information
Showing
44 changed files
with
1,174 additions
and
252 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 |
---|---|---|
|
@@ -102,7 +102,7 @@ jobs: | |
VERSION_SHORT: v${{ steps.build.outputs.version_short }} | ||
run: | | ||
echo "VERSION_SHORT: $VERSION_SHORT" | ||
sudo chown -R $(whoami) . | ||
# sudo chown -R $(whoami) . | ||
git config user.name "CI build" | ||
git config user.email [email protected] | ||
git tag -fa $VERSION_SHORT -m $VERSION_SHORT | ||
|
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,27 @@ | ||
{ | ||
// Use IntelliSense to learn about possible attributes. | ||
// Hover to view descriptions of existing attributes. | ||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
"name": "Jest Debug opened file", | ||
"type": "node", | ||
"request": "launch", | ||
"runtimeExecutable": "npm", | ||
"args": [ | ||
"test", | ||
"--", | ||
// "--testPathPattern", | ||
// "${fileBasenameNoExtension}", | ||
"--runInBand", | ||
"--all", | ||
"--watchAll" | ||
], | ||
"cwd": "${workspaceRoot}/azdo-task/DevContainerBuildRun", | ||
"protocol": "inspector", | ||
"console": "integratedTerminal", | ||
"internalConsoleOptions": "neverOpen" | ||
}, | ||
] | ||
} |
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
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,18 @@ | ||
import { | ||
exec | ||
} from '../src/exec' | ||
|
||
describe('exec', () => { | ||
test('non-silent returns correct output', async () => { | ||
const result = await exec('bash', ['-c', 'echo hi'], {silent: false}) | ||
console.log(result) | ||
expect(result.exitCode).toBe(0) | ||
expect(result.stdout).toStrictEqual('hi\n') | ||
}) | ||
test('silent returns correct output', async () => { | ||
const result = await exec('bash', ['-c', 'echo hi'], {silent: true}) | ||
console.log(result) | ||
expect(result.exitCode).toBe(0) | ||
expect(result.stdout).toStrictEqual('hi\n') | ||
}) | ||
}) |
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,5 +1,11 @@ | ||
import { ExecFunction } from './exec'; | ||
export declare function isDockerBuildXInstalled(exec: ExecFunction): Promise<boolean>; | ||
export declare function buildImage(exec: ExecFunction, imageName: string, checkoutPath: string, subFolder: string): Promise<void>; | ||
export declare function runContainer(exec: ExecFunction, imageName: string, checkoutPath: string, subFolder: string, command: string, envs?: string[]): Promise<void>; | ||
export declare function buildImage(exec: ExecFunction, imageName: string, checkoutPath: string, subFolder: string): Promise<string>; | ||
export declare function runContainer(exec: ExecFunction, imageName: string, checkoutPath: string, subFolder: string, command: string, envs?: string[], mounts?: string[]): Promise<void>; | ||
export declare function pushImage(exec: ExecFunction, imageName: string): Promise<void>; | ||
export interface DockerMount { | ||
type: string; | ||
source: string; | ||
target: string; | ||
} | ||
export declare function parseMount(mountString: string): DockerMount; |
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 +1,9 @@ | ||
export declare type ExecFunction = (command: string, args: string[]) => Promise<number>; | ||
export interface ExecResult { | ||
exitCode: number; | ||
stdout: string; | ||
stderr: string; | ||
} | ||
export interface ExecOptions { | ||
silent?: boolean; | ||
} | ||
export declare type ExecFunction = (command: string, args: string[], options: ExecOptions) => Promise<ExecResult>; |
Oops, something went wrong.