Acceptance test harness - Not able to specify the local plugin to put into the test environment

69 views
Skip to first unread message

Hicham Ouchker

unread,
Jan 9, 2015, 1:57:33 PM1/9/15
to jenkin...@googlegroups.com
Hi,

I want to test an unreleased version of a plugin with the acceptance test harness,
but I am not able to specify the local plugin .hpi file to put into the test environment.

I tried the following procedure without success :
https://github.com/jenkinsci/acceptance-test-harness/blob/master/docs/LOCALPLUGIN.md

- I tried to set the environment variable with this command (in pwd i put my local path):

export plugin.hpi=pwd/plugin.hpi

I had this error message : not a valid identifier,
I think the variable name should not contain the point.

Could you give me more details how to use a local plugin with ATH ??

Best Regards,

Hicham

Ulli Hafner

unread,
Jan 9, 2015, 2:58:59 PM1/9/15
to jenkin...@googlegroups.com
I did not use LOCALPLUGIN yet but I normally deploy my plug-in snapshots to my local JENKINS_HOME/plugin directory. The plug-ins of the JENKINS_HOME directory are then automatically used for the acceptance tests. You just need to set JENKINS_HOME.

--
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 jenkinsci-de...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/bf5e0433-dab3-4a13-94bb-bfb8e748e68f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

signature.asc

oliver gondža

unread,
Jan 9, 2015, 3:30:43 PM1/9/15
to jenkin...@googlegroups.com, Hicham Ouchker
On Fri, 09 Jan 2015 19:57:33 +0100, Hicham Ouchker
<hicham....@gmail.com> wrote:

> Hi,
>
> I want to test an unreleased version of a plugin with the acceptance test
> harness,

PLUGINS_DIR[1] should work, I use it routinely.

[1]
https://github.com/jenkinsci/acceptance-test-harness/blob/master/docs/CONTROLLER.md

--
oliver

Hicham Ouchker

unread,
Jan 9, 2015, 9:31:07 PM1/9/15
to jenkin...@googlegroups.com, hicham....@gmail.com
Many thanks for your response.
I am confused how to setup a directory of plugins to be loaded on Jenkins startup, and force jenkins to use a local plugin.
 - I tried to run this command :
PLUGINS_DIR=pwd/plugins mvn test
(pwd my local path )
I had this exception : java.lang.IllegalArgumentException: plugin not installed

 - Also, I set the env with this variable: export PLUGINS_DIR="pwd/plugins"

I guess I missed something, Could you tell me wath is wrong .

Regards,

---------
Hicham

Jesse Glick

unread,
Jan 11, 2015, 8:47:34 AM1/11/15
to Jenkins Dev
On Fri, Jan 9, 2015 at 1:57 PM, Hicham Ouchker <hicham....@gmail.com> wrote:
> I want to test an unreleased version of a plugin with the acceptance test harness,
> but I am not able to specify the local plugin .hpi file to put into the test environment.

I added LOCAL_SNAPSHOTS=true especially for this use case. It is much
more convenient than the earlier system. Try it.

oliver gondža

unread,
Jan 13, 2015, 4:41:29 PM1/13/15
to jenkin...@googlegroups.com, Hicham Ouchker
On Sat, 10 Jan 2015 03:31:07 +0100, Hicham Ouchker
<hicham....@gmail.com> wrote:

> Many thanks for your response.
> I am confused how to setup a directory of plugins to be loaded on Jenkins
> startup, and force jenkins to use a local plugin.
> - I tried to run this command :
> PLUGINS_DIR=pwd/plugins mvn test
> (pwd my local path )
> I had this exception : java.lang.IllegalArgumentException: plugin not
> installed

This should work assuming you have directory called plugins in your PWD.
It is a flat directory of .[jh]pi files that would all be loaded. Please
report problems to jira.

--
oliver

Hicham Ouchker

unread,
Jan 13, 2015, 5:50:24 PM1/13/15
to jenkin...@googlegroups.com

Thanks you,
It works finally with PLUGINS_DIR.
The thing is if we decide to use local plugin, we have to put all plugins dependencies in PLUGINS_DIR directory.
In other word,when we use the annotation @WithPlugins, all plugins passed in parameter should be in PLUGINS_DIR directory.

Regards,
Hicham

oliver gondža

unread,
Jan 14, 2015, 2:28:07 AM1/14/15
to jenkin...@googlegroups.com, Hicham Ouchker
On Tue, 13 Jan 2015 23:50:24 +0100, Hicham Ouchker
<hicham....@gmail.com> wrote:

>
> Thanks you,
> It works finally with PLUGINS_DIR.
> The thing is if we decide to use local plugin, we have to put all plugins
> dependencies in PLUGINS_DIR directory.
> In other word,when we use the annotation @WithPlugins, all plugins passed
> in parameter should be in PLUGINS_DIR directory.

Right, the main use case for PLUGINS_DIR is slightly different so the
other alternatives might me more convenient in your case.

--
oliver

Jesse Glick

unread,
Jan 14, 2015, 11:26:43 AM1/14/15
to Jenkins Dev, hicham....@gmail.com
On Tue, Jan 13, 2015 at 5:50 PM, Hicham Ouchker
<hicham....@gmail.com> wrote:
> The thing is if we decide to use local plugin, we have to put all plugins
> dependencies in PLUGINS_DIR directory.
> In other word,when we use the annotation @WithPlugins, all plugins passed in
> parameter should be in PLUGINS_DIR directory.

Did you try using LOCAL_SNAPSHOTS=true instead? Then you need not
worry about this. Either the dependency is a release version, which
would get downloaded on demand anyway, or it is a SNAPSHOT version,
which you must have built anyway to get the main plugin to build, so
the test would pick it up.

Scott Hebert

unread,
Jan 22, 2015, 2:18:31 PM1/22/15
to jenkin...@googlegroups.com, hicham....@gmail.com
Hi,

It seems that v1.13 of acceptance-test-harness does not include Jesse's fixes for LocalOverrideUpdateCenterMetadataDecoratorImpl to enable it to executed. (See https://github.com/jenkinsci/acceptance-test-harness/commit/833d17d2d10ff9bc242818222033a4787e52b50f)

Could we please request a new version of ATH?

Thanks!

Scott

--
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 jenkinsci-dev+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/CANfRfr3hdtON-QRdyU_59aCL3Ga7X4jTJMwFVe5xHT25PEu3UA%40mail.gmail.com.

Jesse Glick

unread,
Jan 22, 2015, 4:00:23 PM1/22/15
to Jenkins Dev
On Thu, Jan 22, 2015 at 2:18 PM, Scott Hebert <sco...@gmail.com> wrote:
> Could we please request a new version of ATH?

I released 1.14.
Reply all
Reply to author
Forward
0 new messages