Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add Conan v2 support to JFrog Extension 2.x #479

Open
GitHuborion opened this issue Feb 13, 2024 · 0 comments
Open

add Conan v2 support to JFrog Extension 2.x #479

GitHuborion opened this issue Feb 13, 2024 · 0 comments
Labels
feature request New feature or request

Comments

@GitHuborion
Copy link

GitHuborion commented Feb 13, 2024

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 #434

Please add Conan v2 support to JFrog Extension v2.

@GitHuborion GitHuborion added the feature request New feature or request label Feb 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant