Skip to content

Commit

Permalink
🐛 Do not provide QODANA_ENV from the Azure extension
Browse files Browse the repository at this point in the history
  • Loading branch information
tiulpin committed Feb 15, 2023
1 parent e04c1d0 commit 7afb26c
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 14 deletions.
5 changes: 0 additions & 5 deletions vsts/QodanaScan/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4429,11 +4429,9 @@ var require_utils2 = __commonJS({
exports2.getInputs = getInputs;
function qodana(args = []) {
return __awaiter2(this, void 0, void 0, function* () {
const env = isServices() ? "azure-services" : "azure-server";
if (args.length === 0) {
const inputs = getInputs();
args = (0, qodana_12.getQodanaScanArgs)(inputs.args, inputs.resultsDir, inputs.cacheDir);
args.push("-e", `QODANA_ENV=${env}:${qodana_12.VERSION}`);
}
return tl2.exec(qodana_12.EXECUTABLE, args, {
ignoreReturnCode: true,
Expand Down Expand Up @@ -4485,9 +4483,6 @@ var require_utils2 = __commonJS({
});
}
exports2.uploadReport = uploadReport;
function isServices() {
return tl2.getVariable("SYSTEM_TEAMFOUNDATIONCOLLECTIONURI") !== void 0;
}
}
});

Expand Down
9 changes: 0 additions & 9 deletions vsts/src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,9 @@ export function getInputs(): Inputs {
* @returns The qodana command execution output.
*/
export async function qodana(args: string[] = []): Promise<number> {
const env = isServices() ? 'azure-services' : 'azure-server'
if (args.length === 0) {
const inputs = getInputs()
args = getQodanaScanArgs(inputs.args, inputs.resultsDir, inputs.cacheDir)
args.push('-e', `QODANA_ENV=${env}:${VERSION}`)
}
return tl.exec(EXECUTABLE, args, {
ignoreReturnCode: true,
Expand Down Expand Up @@ -117,10 +115,3 @@ export async function uploadReport(
tl.warning(`Failed to upload report – ${(error as Error).message}`)
}
}

/**
* Check if the pipeline is run on Azure DevOps Services.
*/
function isServices(): boolean {
return tl.getVariable('SYSTEM_TEAMFOUNDATIONCOLLECTIONURI') !== undefined
}

0 comments on commit 7afb26c

Please sign in to comment.