jenkinsci / artifact-promotion-plugin

A simple Jenkins plugin to promote artifacts.
29 stars 23 forks source link

Implement optional extension point of JobDSL plugin #7

Closed patrickschlebusch closed 8 years ago

patrickschlebusch commented 9 years ago

Add an extension point implementation to add support for the artifact promotion plugin to the DSL of the JobDsl plugin.

With this change, artifact promotion build steps can be created in Job DSL scripts like this:

job('example') {
    steps {
        // assumes default repo system (NexusOSS)
        artifactPromotion {
          groupId("com.example.test")
          artifactId("my-artifact")
          version("1.0.0")
          extension("zip")
          stagingRepository("http://nexus.myorg.com:8080/content/repositories/release-candidates", "foo", "s3cr3t")
          releaseRepository("http://nexus.myorg.com:8080/content/repositories/releases", "foo", "s3cr3t")
        }
    }
}
jenkinsadmin commented 9 years ago

Thank you for a pull request! Please check this document for how the Jenkins project handles pull requests

hcguersoy commented 8 years ago

Hi Patrick,

I'll check and test this and will give you feedback as soon as possible.

hcguersoy commented 8 years ago

Hi Patrick,

works fine, thank you for contributing.

A minor thing I observed: creating a job and running it without not going into the configuration of the generated job and saving it once will cause a java.lang.ClassNotFoundException: org.jenkinsci.artifactpromotion.NexusOSSPromotor . May we've to observe this, but its not a show stopper so I merge this into master and will release 0.3.6 with this feature enabled.

patrickschlebusch commented 8 years ago

Hi Halil-Cem,

thanks for your feedback. I'll try to reproduce the issue and see if I can do anything about it.