jfrog-azure-devops-extension icon indicating copy to clipboard operation
jfrog-azure-devops-extension copied to clipboard

add Conan v2 support to JFrog Extension 2.x

Open GitHuborion opened this issue 1 year ago • 2 comments

We are running v2 JFrog Extension https://marketplace.visualstudio.com/items?itemName=JFrog.jfrog-azure-devops-extension But unfortunately are we not able to use it for Conan Task.

We are trying to test something with Artifactory 7.68.19 and JFrog Extension v2 (2.9.2) / JFrog Artifactory V2 service connection


Pipeline Tasks:

  • task: CmdLine@2 inputs: script: 'conan --version'

Output1: "C:\Windows\system32\cmd.exe" /D /E:ON /V:OFF /S /C "CALL "D:_agent_work_temp\bf69db0e-8ce5-4d15-b389-92a0bcb0fda8.cmd""

Conan version 2.0.13

  • task: JFrogConan@1 inputs: conanCommand: 'Add Remote' remoteName: 'svc' artifactoryConnection: 'JFrogServiceConnection_v2' conanRepo: 'POC_Conan' purgeExistingRemotes: true

  • task: JFrogConan@1 inputs: conanCommand: 'Create' createPath: '.' createReference: 'nanobind' buildName: '$(Build.DefinitionName)' buildNumber: '$(Build.BuildNumber)'

  • task: JFrogConan@1 inputs: conanCommand: 'Upload' patternOrReference: 'nanobind/*' extraArguments: '-r=svc' buildName: '$(Build.DefinitionName)' buildNumber: '$(Build.BuildNumber)'

Output2: "C:\Program Files\Conan\conan\conan.exe" remote add svc https://artifactory.com/artifactory/api/conan/POC_Conan --insert --force usage: conan remote [-h] [-v [V]] {add} ... conan remote: error: unrecognized arguments: --insert

From Conan docu: Conan remote add Conan v1 uses --insert: https://docs.conan.io/en/1.5/reference/commands/misc/remote.html Conan v2 uses has no –insert, it has --index INDEX: https://docs.conan.io/2/reference/commands/remote.html?highlight=remote

+++

Found in JFrog code GitHub - jfrog/jfrog-azure-devops-extension at 2.9.2

conanBuild.js : function handleAddRemoteCommand() Ln87: let conanArguments = ['remote', 'add', remoteName, utils.stripTrailingSlash(artifactoryUrl) + '/api/conan/' + conanRepo, '--insert', '--force'];

jfrog-azure-devops-extension-2.9.2\tasks\JFrogConan\task.json Ln223: "execution": { "Node10": { "target": "conanBuild.js" } } }

We did open Ticket [#284253] Jfrog extension, where we found out there is an open pull https://github.com/jfrog/jfrog-azure-devops-extension/pull/434

Please add Conan v2 support to JFrog Extension v2.

GitHuborion avatar Feb 13 '24 13:02 GitHuborion

We raised another support ticket for JFrog and were asked to create a feature request here. As there is already this request, I vote for this feature to be implemented soon

The feature is quite urgent as of the following announcement: https://blog.conan.io/2024/09/30/Conan-Center-will-stop-receiving-updates-for-Conan-1.html

stefankaufmann avatar Nov 05 '24 08:11 stefankaufmann

The PR adding support for Conan v2 has been open since 2023 is anyone available to review this? https://github.com/jfrog/jfrog-azure-devops-extension/pull/434

patrickishere avatar Jul 03 '25 01:07 patrickishere