0
votes

I try to use jenkins pipeline to upload gradle artifacts to the maven repository. I have followed Working With Pipeline Jobs in Jenkins

As mentioned in the referenced document, the rtGradle.run shall deploy build artifacts to the artifactory. However, no build artifacts are deployed in my case.

I have checked the content of buildInfo.getDeployableArtifacts and figured out that it is empty.

Following some hints, I have put the following code to my build.gradle:

    apply plugin: 'maven-publish'

    publishing {
        publications {
            mavenJava(MavenPublication) {
                artifact file("bmo-interface-common/build/libs/bmo-interface-common-${version}.jar")
            }
        }
    }

However, the previous doesn't help and still no artifact is deployed.

Where is the problem? What do I miss?

Thanks for any input.

EDIT

I have forget to add server setting for the gradle deployer. With this setting the deployment was successful.

1

1 Answers

0
votes

"I have forget to add server setting for the gradle deployer. With this setting the deployment was successful" please add this as an answer and put it as the right answer.