Problems with ENV variables in jenkins 2.1.41?

26 views
Skip to first unread message

Gorgonz ola

unread,
Sep 5, 2018, 6:46:50 AM9/5/18
to Jenkins Users
Again, I'm new to jenkins. So maybe someone should validate, that it is the jenkins version and not a different presumption ;-)

Using jenkins 2.1.40 with opensuse leap 15.0:
- I'm able to define ENV variables in the global config
- a shell build step in order to echo the variables works fine

The resultung konsole output from "echo HTDOCS_DIR $HTDOCS_DIR ..." is:
+ echo HTDOCS_DIR /srv/www/htdocs/
HTDOCS_DIR
/srv/www/htdocs/
+ echo JOOMLA4_DIR joomla4-dev
JOOMLA4_DIR joomla4
-dev

Using jenkins 2.1.41 with opensuse leap thumbleweed:
- I'm able to define ENV variables in the global config
- a shell build step in order to echo the variables shows empty values

The resulting konsole output is:
+ echo HTDOCS_DIR
HTDOCS_DIR
+ echo JOOMLA4_DIR
JOOMLA4_DIR


Gorgonz ola

unread,
Sep 5, 2018, 12:55:21 PM9/5/18
to Jenkins Users
[UPD]Nope, its not that simple, Returning to version 2.1.40 did not help. Its likely a problem, that results from the newer packages, that are installed with tumbleweed

Cuong Tran

unread,
Sep 6, 2018, 2:37:54 PM9/6/18
to Jenkins Users
I would try to verify this with a FreeStyle job to see if the problem is somewhere else.

Gorgonz ola

unread,
Sep 6, 2018, 2:56:31 PM9/6/18
to Jenkins Users
Hi Cuong,

thanks for Your suggestion. I did it with a free style job and used as build step a shell. I think, this is the most simple test ;-)

But tumbleweed has pretty new packages and I can't figure out, which one causes the trouble, especially since there is only one dependency, that I'm aware of: java resp. openjdk

In both oss I'm using the same: openjdk 1.8.0

But wait, maybe it is the webserver ... tumbleweed uses 2.4.34 and leap uses 2.4.33. No I don't think, that makes the difference.

Björn Pedersen

unread,
Sep 7, 2018, 2:00:50 AM9/7/18
to Jenkins Users
Hi,

Am Mittwoch, 5. September 2018 12:46:50 UTC+2 schrieb Gorgonz ola:
Again, I'm new to jenkins. So maybe someone should validate, that it is the jenkins version and not a different presumption ;-)

Using jenkins 2.1.40 with opensuse leap 15.0:

What are the jenkins versions (as  reportes e.g. in UI), not the package version?
There is no 2.1.40 ( either you are usin g a LTS version, then it be a triple-dotted number, the first in the 2-series is 2.7.1, or a weekly  build, then it is a doublet, current 2.141)
I guess you  have a 2.140/141 installed,
And of course the installed plugins also are important. Are they up to date?
And what global config are you  referring to?
Manage jenkins -> global properties -> Environment variables ?
Node config -> Node properties -> Environment variables?
Job variables (EnvInject plugin??)

Björn

Björn Pedersen

unread,
Sep 7, 2018, 2:08:33 AM9/7/18
to Jenkins Users

And what global config are you  referring to?
Manage jenkins -> global properties -> Environment variables ?
==> works ok on 2.141 here
  
Node config -> Node properties -> Environment variables?

==> A global vars are not overriden  by node vars
==> If defined just as node variable works OK
 
Reply all
Reply to author
Forward
0 new messages