0
votes

Im a little confused about how this should work.

I have a jfrog maven repo

Right now in my jenkins pipeline Im just using mvn deploy to deploy to it

But i want to get build info too.

There is a jenkins plugin you access in a pipeline like this:

def artifactory = Artifactory.server 'my-jfrog.jfrog.io'
def buildInfo = Artifactory.newBuildInfo()

But then there is also a maven specific thing: def rtMaven = Artifactory.newMavenBuild()

It looks like if you use newMavenBuild() it runs mvn for you? I dont want that. I'd like to run my own mvn commands but also add jfrog build info for those package deploys- is this possible? Can I run mvn myself and also create build info for those?

1
Are you missing the Maven Artifactory Plugin jfrog.com/confluence/display/RTF/Maven+Artifactory+Plugin ? - J Fabian Meier
1. rtMaven.run() runs mvn for you. 2. Why wouldn't you want that the plugin run mvn for you? - yahavi

1 Answers

0
votes

Here are list of buildinfo's

def artifactory = Artifactory.server 'my-jfrog.jfrog.io'
def buildInfo = Artifactory.newBuildInfo()
def rtMaven = Artifactory.newMavenBuild()
def rtGradle = Artifactory.newGradleBuild()
def rtNpm = Artifactory.newNpmBuild()
def conanClient = Artifactory.newConanClient()
def rtDocker = Artifactory.docker server: server, host: "tcp://<daemon IP>:<daemon port>"

def rtMaven = Artifactory.newMavenBuild() it will create a maven repository and will download all your artifacts from maven automatically and will upload all your artifacts to your artifactory

Please find more information at below doc https://www.jfrog.com/confluence/display/RTF/Scripted+Pipeline+Syntax