Skip to content

Commit

Permalink
🐛 Fix nightly CLI in Qodana for Azure
Browse files Browse the repository at this point in the history
  • Loading branch information
tiulpin committed Jan 8, 2025
1 parent 459d541 commit d7ebc77
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 13 deletions.
2 changes: 2 additions & 0 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,6 @@ steps:
AGENT_USE_NODE10: true
inputs:
uploadResult: true
useNightly: true
uploadSarif: "false"
args: --log-level,debug,-l,jetbrains/qodana-jvm-community:latest,--property,idea.headless.enable.statistics=false,--config,.github/qodana.yaml
6 changes: 3 additions & 3 deletions vsts/QodanaScan/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -14744,7 +14744,7 @@ var require_utils3 = __commonJS({
return __awaiter2(this, arguments, void 0, function* (args, useNightly = false) {
const arch = (0, qodana_12.getProcessArchName)();
const platform = (0, qodana_12.getProcessPlatformName)();
const temp = yield tool.downloadTool((0, qodana_12.getQodanaUrl)(arch, platform));
const temp = yield tool.downloadTool((0, qodana_12.getQodanaUrl)(arch, platform, useNightly));
if (!useNightly) {
const expectedChecksum = (0, qodana_12.getQodanaSha256)(arch, platform);
const actualChecksum = (0, qodana_12.sha256sum)(temp);
Expand All @@ -14758,7 +14758,7 @@ var require_utils3 = __commonJS({
} else {
extractRoot = yield tool.extractTar(temp);
}
tool.prependPath(yield tool.cacheDir(extractRoot, qodana_12.EXECUTABLE, useNightly ? "nightly" : qodana_12.VERSION));
tool.prependPath(yield tool.cacheDir(extractRoot, qodana_12.EXECUTABLE, qodana_12.VERSION));
if (!(0, qodana_12.isNativeMode)(args)) {
const pull = yield qodana((0, qodana_12.getQodanaPullArgs)(args));
if (pull !== 0) {
Expand Down Expand Up @@ -14931,7 +14931,7 @@ function main() {
const inputs = (0, utils_1.getInputs)();
tl.mkdirP(inputs.resultsDir);
tl.mkdirP(inputs.cacheDir);
yield (0, utils_1.prepareAgent)(inputs.args);
yield (0, utils_1.prepareAgent)(inputs.args, inputs.useNightly);
const exitCode = yield (0, utils_1.qodana)();
yield (0, utils_1.uploadArtifacts)(inputs.resultsDir, inputs.artifactName, inputs.uploadResult);
(0, utils_1.uploadSarif)(inputs.resultsDir, inputs.uploadSarif);
Expand Down
2 changes: 1 addition & 1 deletion vsts/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ async function main(): Promise<void> {
const inputs = getInputs()
tl.mkdirP(inputs.resultsDir)
tl.mkdirP(inputs.cacheDir)
await prepareAgent(inputs.args)
await prepareAgent(inputs.args, inputs.useNightly)
const exitCode = (await qodana()) as QodanaExitCode
await uploadArtifacts(
inputs.resultsDir,
Expand Down
10 changes: 2 additions & 8 deletions vsts/src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ export async function prepareAgent(
): Promise<void> {
const arch = getProcessArchName()
const platform = getProcessPlatformName()
const temp = await tool.downloadTool(getQodanaUrl(arch, platform))
const temp = await tool.downloadTool(getQodanaUrl(arch, platform, useNightly))
if (!useNightly) {
const expectedChecksum = getQodanaSha256(arch, platform)
const actualChecksum = sha256sum(temp)
Expand All @@ -128,13 +128,7 @@ export async function prepareAgent(
} else {
extractRoot = await tool.extractTar(temp)
}
tool.prependPath(
await tool.cacheDir(
extractRoot,
EXECUTABLE,
useNightly ? 'nightly' : VERSION
)
)
tool.prependPath(await tool.cacheDir(extractRoot, EXECUTABLE, VERSION))
if (!isNativeMode(args)) {
const pull = await qodana(getQodanaPullArgs(args))
if (pull !== 0) {
Expand Down
2 changes: 1 addition & 1 deletion vsts/vss-extension.dev.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"manifestVersion": 1,
"id": "qodana-dev",
"name": "Qodana (Dev)",
"version": "2024.3.149",
"version": "2024.3.152",
"publisher": "JetBrains",
"targets": [
{
Expand Down

0 comments on commit d7ebc77

Please sign in to comment.