-
Notifications
You must be signed in to change notification settings - Fork 38
how do I use plugin with gradle #24
Comments
I naively tried the same thing that @veonua tried in order to get Gradle-based builds to use the plugin. From my cursory read of the code, there is nothing that I've seen which would support an actual upload of an artifact. It's not clear to me whether this enhancement request is something @magnayn wants to see in this GitHub Issues or in the Jenkins JIRA though |
So.. The original repository plugin was deeply integrated with the jenkins maven The repository plugin looks for the same artifacts, and presents them in a If your build isn't a maven project type, there are no artifacts The fix I have for "maven, but executed via freestyle" is to add an extra This is in -master, we're using it in production but it's a little rough For gradle you could do something similar. You need to figure out how to On Mon, Nov 2, 2015 at 3:43 PM, R. Tyler Croy [email protected]
|
@magnayn |
I don't think I have anything public (it was hacked in in order to jump to freestyle). That said, I think what you need to do is -
(I do this in a parent pom so it gets applied to all children). That plugin itself is hosted within the repository on Jenkins - so either you need to add it to your POM (or we just added jenkins repository to our nexus instance so it was available) What you should see is artifacts being 'reported' to jenkins. I think you also need to trigger the updaterpublisher after the build is completed (which walks the list of reported artefacts and archives them) - there should be a UI thing for builds, or I think step([$class: 'UpdaterPublisher']); from a Jenkinsfile. |
To be honest, I only understood half of that. I don't know a ton about Jenkins, my team just needed one for giving people beta versions of our software. What exactly did you mean by "make sure the nodes in your POM are correct with the jenkins URL"? I'm not entirely sure how I'm supposed to be linking this project to my Jenkins server. Other than that though, I just put that plugin into the POM of the project I want deployed to Maven, right? And then I add Sorry for inconveniencing you like this, I just don't know much about the inner workings of Jenkins. Any help you could provide me would be greatly appreciated. |
@magnayn |
my best guess was
artifacts {
archives jarFile
}
uploadArchives {
repositories {
mavenDeployer {
repository(url: System.getenv("Jenkins.Repository"))
pom.project {
licenses {
license {
name 'Testing'
url 'http://test.com'
distribution 'repo'
}
}
}
}
}
}
but server error:
Execution failed for task ':sdk:uploadArchives'.
The text was updated successfully, but these errors were encountered: