jfrog / jenkins-artifactory-plugin

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

Build step description could be more descriptive #134

Open tmwa opened 5 years ago

tmwa commented 5 years ago

Currently the build steps from the plugin show in Blue Ocean as generic "Run a Conan command" etc. It would be useful to display the full command line for example.

jgsogo commented 5 years ago

Hi, can you share with us the Jenkinsfile or the configuration you are using? I'm trying with a JenkinsFile like this one:

def artifactory_name = "Artifactory Docker"
def artifactory_repo = "conan-local"
String docker_image = "conanio/gcc8"

node {
    docker.image(docker_image).inside('-v /tmp:/tmp --net=docker_jenkins_artifactory') {
        def server = Artifactory.server artifactory_name
        def client = Artifactory.newConanClient()
        def remoteName = client.remote.add server: server, repo: artifactory_repo

        stage("Get project") {
              checkout scm
        }

        stage("Get dependencies and create app") {
            String createCommand = "create . user/channel"
            client.run(command: createCommand)
        }

        stage("Upload packages") {
            String uploadCommand = "upload core-communications* --all -r ${remoteName} --confirm"
            def buildInfo = client.run(command: uploadCommand)
            //b.env.collect()
            server.publishBuildInfo buildInfo
        }
    }
}

and I'm seeing the name of the steps in the BlueOcean (v1.18.0) window:

image

Thanks!

tmwa commented 5 years ago

Those are not build steps, those are stages. The steps for the selected stage are listed below what you screenshotted in blue ocean.

Currently the build step created by client.run simply has the description "Run a Conan command". This is hard coded here: https://github.com/jfrog/jenkins-artifactory-plugin/blob/0092ca8af908eff730d6d4adbc41f77fd7106901/src/main/java/org/jfrog/hudson/pipeline/scripted/steps/conan/RunCommandStep.java#L161