> Am 28.08.2020 um 17:21 schrieb Jesse Glick <[email protected]>:
> 
> On Thu, Aug 27, 2020 at 5:22 PM Ullrich Hafner <[email protected]> 
> wrote:
>> Do we have something existing that can extract the list of dependencies for 
>> a plugin…
> 
> I think it would suffice to inject a new implementation of
> `UpdateCenterMetadataDecorator` using
> `PluginMetadata.LocalOverride.create` based on
> `target/{,test-classes/test-dependencies/}*.hpi`. Or simply use the
> existing implementation and define the environment variable
> `LOCAL_JARS` in your launcher script.
> 

This is a beautiful solution! Thank you for the tip: I now use the following 
properties:
<environmentVariables>
  <PLUGINS_DIR>../plugin/target/test-classes/test-dependencies</PLUGINS_DIR>
  <JENKINS_VERSION>${jenkins.version}</JENKINS_VERSION>
  <BROWSER>firefox-container</BROWSER>
</environmentVariables>
(And before the UI tests start it is required to copy the hpi under test into 
the test-dependencies folder as well) 

Now everything is green (or blue) again! This also improves the runtime of the 
tests (now about 2min per test):
https://ci.jenkins.io/job/Plugins/job/warnings-ng-plugin/job/PR-595/lastCompletedBuild/testReport/io.jenkins.plugins.analysis.warnings/SmokeTests/
 
<https://ci.jenkins.io/job/Plugins/job/warnings-ng-plugin/job/PR-595/lastCompletedBuild/testReport/io.jenkins.plugins.analysis.warnings/SmokeTests/>

Old variant (about 4min per test):
https://ci.jenkins.io/job/Plugins/job/warnings-ng-plugin/job/master/988/testReport/io.jenkins.plugins.analysis.warnings/SmokeTests/
 
<https://ci.jenkins.io/job/Plugins/job/warnings-ng-plugin/job/master/988/testReport/io.jenkins.plugins.analysis.warnings/SmokeTests/>


> Plugins not mentioned in this list will still be retrieved according
> to versions in the online UC (though by default using Maven to
> retrieve local copies of the actual binaries). You could inject an
> alternate `UpdateCenterMetadataProvider` to completely override that,
> so that only dependencies in the test classpath are offered; this
> would match the behavior of `JenkinsRule` (other than when annotated
> by `@WithPlugin`).
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Jenkins Developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected].
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/jenkinsci-dev/CANfRfr32vCiP5eJdqpq%2BUc1dATxmf%3DzBRBZkGLx%3Dt3%3DwvdpAKg%40mail.gmail.com.

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-dev/34A7CDC5-0967-44F1-8A62-10F01D18DF50%40gmail.com.

Reply via email to