jfrog / jenkins-artifactory-plugin

Jenkins artifactory plugin
http://jenkins-ci.org/
116 stars 189 forks source link

Artifactory Plugin is not working with Conan-2.0 #820

Open maitrey opened 1 year ago

maitrey commented 1 year ago

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.

wayneph01 commented 1 year ago

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.

wbehrens-on-gh commented 1 year ago

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)
maitrey commented 1 year ago

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

gegles commented 1 year ago

Any timeline/update on this?

eyalbe4 commented 1 year ago

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.

NoWiseMan commented 1 year ago

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

memsharded commented 1 year ago

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.

gegles commented 1 year ago

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!

NoWiseMan commented 1 year ago

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 commented 1 year ago

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

CJCombrink commented 1 month ago

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

memsharded commented 1 month ago

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.

CJCombrink commented 1 month ago

@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

memsharded commented 1 month ago

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.

CJCombrink commented 1 month ago

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?

memsharded commented 1 month ago

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.