jenkins-artifactory-plugin icon indicating copy to clipboard operation
jenkins-artifactory-plugin copied to clipboard

Artifactory Plugin is not working with Conan-2.0

Open maitrey opened this issue 1 year ago • 10 comments

Is your feature request related to a problem? Please describe. Dear Conan Folks,

I use Jenkins as CI Tool. I used this to upload package to Artifactory repo with Conan1.x:

def upload(def artifactoryname, def artifactoryrepo, String buildname, String pkg_refernce){ println "Artifactory name is:" + artifactoryname + " Artifactory repo is: " + artifactoryrepo def buildInfo = Artifactory.newBuildInfo() buildInfo.name = buildname def server = Artifactory.server artifactoryname def client = Artifactory.newConanClient userHome: "${env.WORKSPACE}/conan".toString() def serverName = client.remote.add server: server, repo:artifactoryrepo , force: true String command_upload = "upload ${pkg_refernce} -r ${serverName} --confirm" client.run command: command_upload, buildInfo: buildInfo server.publishBuildInfo buildInfo } But with conan-2.x it fails with: cmd.exe /C "conan config set log.trace_file=E:\J\feature_bringupconan2/conan\conan_log.log && exit %%ERRORLEVEL%%"

conan config set doesnot exist according to conan-2.x https://docs.conan.io/1/reference/commands/consumer/config.html?highlight=conan%20config Could someone please help me?

Describe the solution you'd like to see Conan-2.x shall be supported by the Artifactory Plugin Describe alternatives you've considered Have to use command line conan commands without BuildInfo capabilities.

maitrey avatar May 25 '23 08:05 maitrey

Just now getting started with Conan, Artifactory and Jenkins so we decided to begin in Conan 2.0. Quickly finding out that a lot of the surrounding infrastruction isn't ready for it. One more vote for Conan2 support in the client.

wayneph01 avatar Jun 21 '23 18:06 wayneph01

I'm in the same situation, I tried the jfrog-cli plugin, which I found doesn't support conan at all, then the basic sh step like sh "conan config install -t dir config" but I get

process apparently never started in /home/jenkins/Jenkins/workspace/Conan 2@tmp/durable-c522b9e1
(running Jenkins temporarily with -Dorg.jenkinsci.plugins.durabletask.BourneShellScript.LAUNCH_DIAGNOSTICS=true might make the problem clearer)

wbehrens-on-gh avatar Jun 22 '23 14:06 wbehrens-on-gh

Good that others are facing the same issue. Hopefully, it gets solved soon.

maitrey avatar Jun 27 '23 07:06 maitrey

Any timeline/update on this?

gegles avatar Aug 23 '23 01:08 gegles

The Jenkins Artifactory Plugin will most likely not receive new functionality, since following the introduction of the new next-gen Jenkins JFrog Plugin, it is the component that receives most of the attention when it comes to new functionality. That also includes enhancements to the Artifactory Plugin's DSL. The two plugins can be installed side by side and used together inside the same jobs.

eyalbe4 avatar Aug 23 '23 04:08 eyalbe4

Same issue here. I currently can't see a way to move our Jenkins pipeline over to conan 2

NoWiseMan avatar Aug 29 '23 23:08 NoWiseMan

Just a note, the Artifactory Plugin functionality for Conan is a very thin layer. There is no magic in it, and using Conan directly without it is not a big challenge. In ConanCenter we use Jenkins massively without this plugin. We will be trying to add some docs and examples how to do it, as it seems the new plugin is not going to support Conan 2.0.

memsharded avatar Aug 30 '23 00:08 memsharded

We will be trying to add some docs and examples how to do it

@memsharded, any examples would be amazing, please and thank you. I've been leveraging the info from the CI/CD training and also the skynet_example. Both great, but v1-centric... An updated v2-based example or training would be super useful. Let me know if there is something like that somewhere.. Thx!

gegles avatar Aug 30 '23 00:08 gegles

We will be trying to add some docs and examples how to do it, as it seems the new plugin is not going to support Conan 2.0.

In other words, the Artifactoy plugin will not see an update and the JFrog plugin will never support Conan 2. If this is the case, we have to do it directly 😥

With all the fun to handle windows different that the others!

NoWiseMan avatar Aug 30 '23 08:08 NoWiseMan

@memsharded Did you have a timeframe when you want to release some examples? This would be very interesting and helpful

NoWiseMan avatar Aug 31 '23 07:08 NoWiseMan

@memsharded Any update on examples or something like this for conan 2?

CJCombrink avatar Oct 11 '24 06:10 CJCombrink

Whatever happens won't happen in this plugin, sorry, this plugin is no longer maintained for Conan 2.

What is happening is https://github.com/conan-io/docs/pull/3799, a new CI section into the Conan docs. The plan is to expand it to include a full real implementation. Even if it might use Github Actions the first approach, at some point we will try to add some Jenkins examples too if possible.

memsharded avatar Oct 11 '24 07:10 memsharded

@memsharded Thank you for the response.

Whatever happens won't happen in this plugin, sorry, this plugin is no longer maintained for Conan 2.

Yes that is what I understand from this thread.

Using the current plugin we use the conan integration to build and publish build information to Jenkins. I am hoping/asking for an example to handle the buildInfo part so that we don't loose that information when migrating to conan 2.

I am confident that the current docs would cover everything needed so it should not be too hard to figure it out. Examples just makes it easier

CJCombrink avatar Oct 11 '24 07:10 CJCombrink

Conan 2 developed new tools for the buildInfo in the extensions repo in https://github.com/conan-io/conan-extensions that might help.

Hopefully with the new Conan 2 conan art:xxxx commands, it is not difficult to replace them directly in Jenkins pipeline.

memsharded avatar Oct 11 '24 07:10 memsharded

I got my pipeline migrated to use the conan 2 extension to upload build information to Artifactory. What I am missing now is the Jenkins 'integration' that came out of the box using the plugin as-is for conan 1.

I am referring to these

  1. The green bubble in the build history Image

    • (Yes after 57builds I uploaded empty build info using the plugin just to see what I get)
  2. The "Artifactory Build Info" link in the 'menu' of the specific build Image

is there a way to manually create or trigger this for the plugin? Perhaps this is a "new issue" type of question?

CJCombrink avatar Oct 16 '24 18:10 CJCombrink

Yes, I am afraid this would be a bit outside my expertise, and we need someone else to help with this. If you have JFrog support, but that might be a possible way to ask about this.

memsharded avatar Oct 16 '24 21:10 memsharded