Skip to content

Commit

Permalink
🐛 Fix passing environment variables to Qodana container
Browse files Browse the repository at this point in the history
  • Loading branch information
tiulpin committed Jan 4, 2022
1 parent 78235b1 commit edd36a9
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 9 deletions.
22 changes: 16 additions & 6 deletions __tests__/main.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,14 +64,14 @@ function inputsDefaultFixture(): Inputs {
resultsDir: '${{ runner.temp }}/qodana-results',
cacheDir: '${{ runner.temp }}/qodana-caches',
additionalCacheHash: '',
additionalVolumes: [],
additionalEnvVars: [],
additionalVolumes: ['/tmp/project:/data/project'],
additionalEnvVars: ['TESTS=1', 'RANDOM_SEED=42'],
inspectedDir: '',
ideaConfigDir: '',
baselinePath: '',
baselineIncludeAbsent: false,
failThreshold: '',
profileName: '',
failThreshold: '10',
profileName: 'qodana.recommended',
profilePath: '',
gradleSettingsPath: '',
changes: false,
Expand All @@ -97,9 +97,19 @@ function defaultDockerRunCommandFixture(): string[] {
'-v',
'${{ runner.temp }}/qodana-results:/data/results',
'-u',
`${process.getuid()}:${process.getgid()}`,
'501:20',
'-v',
'/tmp/project:/data/project',
'-e',
'TESTS=1',
'-e',
'RANDOM_SEED=42',
'jetbrains/qodana-jvm-community',
'--save-report'
'--save-report',
'--fail-threshold',
'10',
'-n',
'qodana.recommended'
]
}

Expand Down
2 changes: 1 addition & 1 deletion dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/docker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export function getQodanaRunArgs(inputs: Inputs): string[] {
}
if (inputs.additionalEnvVars.length > 0) {
for (const envVar of inputs.additionalEnvVars) {
args.push('e', envVar)
args.push('-e', envVar)
}
}
if (inputs.ideaConfigDir !== '') {
Expand Down

0 comments on commit edd36a9

Please sign in to comment.