Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion dist/index.js

Large diffs are not rendered by default.

7 changes: 5 additions & 2 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,16 +52,19 @@ export async function main() {
inlineScript = ` set -e >&2; echo '${START_SCRIPT_EXECUTION_MARKER}' >&2; ${inlineScript}`;
scriptFileName = await createScriptFile(inlineScript);

const hostAzureConfigDir = process.env.AZURE_CONFIG_DIR || path.join(process.env.HOME, '.azure');
const containerAzureConfigDir = '/root/.azure';

/*
For the docker run command, we are doing the following
- Set the working directory for docker continer
- volume mount the GITHUB_WORKSPACE env variable (path where users checkout code is present) to work directory of container
- voulme mount .azure session token file between host and container,
- volume mount Azure config directory between host and container,
- volume mount temp directory between host and container, inline script file is created in temp directory
*/
let args: string[] = ["run", "--workdir", `${process.env.GITHUB_WORKSPACE}`,
"-v", `${process.env.GITHUB_WORKSPACE}:${process.env.GITHUB_WORKSPACE}`,
"-v", `${process.env.HOME}/.azure:/root/.azure`,
"-v", `${hostAzureConfigDir}:${containerAzureConfigDir}`,
"-v", `${TEMP_DIRECTORY}:${TEMP_DIRECTORY}`
];
for (let key in process.env) {
Expand Down
3 changes: 2 additions & 1 deletion src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,8 @@ export const checkIfEnvironmentVariableIsOmitted = (key: string): boolean => {
'JOURNAL_STREAM',
'DEPLOYMENT_BASEPATH',
'VCPKG_INSTALLATION_ROOT',
'PERFLOG_LOCATION_SETTING'
'PERFLOG_LOCATION_SETTING',
'AZURE_CONFIG_DIR'
];

const omitEnvironmentVariablesWithPrefix: string [] = [
Expand Down
Loading