Plugin hosting request

57 views
Skip to first unread message

Daniel Olausson

unread,
May 25, 2015, 3:07:34 PM5/25/15
to jenkin...@googlegroups.com
Hi,

GitHub:

Description can be found at:

Shares some similarities with the EnvInject plugin but my plugin doesn't require the user to use any additional build steps.

Br,
Daniel Olausson

domi

unread,
May 26, 2015, 2:02:10 AM5/26/15
to Jenkins Developers
The I guess its about the same as:
/Domi

--
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/1ec4cf30-7ff8-48b4-af3c-c8e703c6e778%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Daniel Olausson

unread,
May 26, 2015, 9:25:01 AM5/26/15
to jenkin...@googlegroups.com
No that plugin let's you provide a file containing environment variables that are then injected at build execution start.

My plugin provides the user with a file where he/she can store environment variables across build steps.

Christopher Orr

unread,
May 26, 2015, 9:38:58 AM5/26/15
to jenkin...@googlegroups.com
EnvInject also lets you write to a properties file in one build step
then inject that file for use in all subsequent build steps.

I see that your plugin may make it a bit more convenient to do so, but
it would be better to merge that functionality into EnvInject, rather
than publishing a separate plugin.

Regards,
Chris


On 26/05/15 15:25, Daniel Olausson wrote:
> No that plugin let's you provide a file containing environment variables
> that are then injected at build execution start.
>
> My plugin provides the user with a file where he/she can store
> environment variables across build steps.
>
>
>
> On Tuesday, 26 May 2015 08:02:10 UTC+2, Dominik Bartholdi wrote:
>
> The I guess its about the same as:
> https://wiki.jenkins-ci.org/display/JENKINS/Envfile+Plugin
> <https://wiki.jenkins-ci.org/display/JENKINS/Envfile+Plugin>
> /Domi
>
> On 25 May 2015, at 21:07, Daniel Olausson <d.ola...@gmail.com

Daniel Olausson

unread,
May 26, 2015, 10:27:26 AM5/26/15
to jenkin...@googlegroups.com
I haven't looked into the EnvInject plugin very deeply but from what I can see you have to create an additional "EnvInject build step" after your own build step in order to inject any potential environment variables into the next build step.

The problem with this is if you have both build steps and post build steps. If your build step fails for some reason any previous build steps will not be executed and thus also the EnvInject build step that is suppose to inject the environment variables into the build.

My plugin works like this:


Build step 1:
"
#!/bin/bash

# do some stuff...
# result = `some program`

echo "RESULT=$result" > $ENVFILE
"

Build step2:
"
#!/bin/bash

# do some other stuff...

echo $RESULT
"

Post build step:
"
#!/bin/bash

# do something with $RESULT
"


Regardless if build step 1 exits successfully or not, the post build step will always know about $RESULT.

When using the EnvInject, from my understanding, I would have to have another build step in between build step 1 and 2 to get $RESULT into build step 2. And if build step 1 fails, the EnvInject build step will not be executed and thus the post build step will not know about $RESULT.

Daniel Olausson

unread,
May 28, 2015, 4:29:17 AM5/28/15
to jenkin...@googlegroups.com
So what do you guys think?
Reply all
Reply to author
Forward
0 new messages