Skip to content

Instantly share code, notes, and snippets.

@k-popov
Created June 15, 2018 12:44
Show Gist options
  • Save k-popov/dd5dc3ea56f135f287e773e161be053d to your computer and use it in GitHub Desktop.
Save k-popov/dd5dc3ea56f135f287e773e161be053d to your computer and use it in GitHub Desktop.

Revisions

  1. k-popov created this gist Jun 15, 2018.
    21 changes: 21 additions & 0 deletions add_allure.groovy
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,21 @@
    import ru.yandex.qatools.allure.jenkins.tools.*
    import hudson.tools.InstallSourceProperty
    import hudson.tools.ToolProperty
    import hudson.tools.ToolPropertyDescriptor
    import hudson.util.DescribableList

    def isp = new InstallSourceProperty()
    def autoInstaller = new AllureCommandlineInstaller("2.6.0")
    isp.installers.add(autoInstaller)

    def proplist = new DescribableList<ToolProperty<?>, ToolPropertyDescriptor>()
    proplist.add(isp)

    def installation = new AllureCommandlineInstallation("allure260", "", proplist)


    def allureDesc = jenkins.model.Jenkins.instance.getExtensionList(AllureCommandlineInstallation.DescriptorImpl.class)[0]


    allureDesc.setInstallations(installation)
    allureDesc.save()