Child pages
  • Started-By Environment Variable Plugin
Skip to end of metadata
Go to start of metadata

Plugin Information

View Started-By Environment Variable on the plugin site for more information.

This plugin makes the user id that started a build available as environment variable.


--------------------

ATTENTION:

This Plugin has/had problems with Jenkins versions >= 1.442 (or somesuch) : JENKINS-12074

There is another (newer) plugin available that allegedly should do "the same" thing: Build User Vars Plugin

--------------------

JENKINS_STARTED_BY

This is the same information that Jenkins normally displays in the Console Output on the first line

Started by user ...

7 Comments

  1. This plugin is exactly what I need. Unfortunatly I'm not able to get the environment variable.

    I'm using Jenkins 1.439 and the  environment variabel is not available for batch script execution, neither on master nor on a slave node.

    Have I missed something or is there a bug in the plugin?

    Regards Jan

    1. Hi Jan,

      please check Build User Vars Plugin, it does what you need.

  2. Like the Build User Vars Plugin, do not forget to make it as an extension of the envinject plugin (JENKINS-11968).

    1. Is link to the issue correct?

  3. Hi! I am trying to set environment variable in master as "SLAVE_IP" with an IP address as a value and use it in Slave(Both master and slave in windows) but somehow it won't recognize the environment variable though it is displayed in system configuration. While launching the agent it gives me error as:

    [10/17/17 15:11:22] [SSH] Opening SSH connection to ${SLAVE_IP}:22.
    
    ${SLAVE_IP}
    java.io.IOException: There was a problem while connecting to ${SLAVE_IP}:22
    	at com.trilead.ssh2.Connection.connect(Connection.java:834)
    	at com.trilead.ssh2.Connection.connect(Connection.java:703)
    	at com.trilead.ssh2.Connection.connect(Connection.java:617)
    	at hudson.plugins.sshslaves.SSHLauncher.openConnection(SSHLauncher.java:1284)
    	at hudson.plugins.sshslaves.SSHLauncher$2.call(SSHLauncher.java:804)
    	at hudson.plugins.sshslaves.SSHLauncher$2.call(SSHLauncher.java:793)
    	at java.util.concurrent.FutureTask.run(Unknown Source)
    	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    	at java.lang.Thread.run(Unknown Source)
    Caused by: java.net.UnknownHostException: ${SLAVE_IP}
    	at java.net.Inet6AddressImpl.lookupAllHostAddr(Native Method)
    	at java.net.InetAddress$2.lookupAllHostAddr(Unknown Source)
    	at java.net.InetAddress.getAddressesFromNameService(Unknown Source)
    	at java.net.InetAddress.getAllByName0(Unknown Source)
    	at java.net.InetAddress.getAllByName(Unknown Source)
    	at java.net.InetAddress.getAllByName(Unknown Source)
    	at java.net.InetAddress.getByName(Unknown Source)
    	at com.trilead.ssh2.transport.TransportManager.createInetAddress(TransportManager.java:166)
    	at com.trilead.ssh2.transport.TransportManager.establishConnection(TransportManager.java:366)
    	at com.trilead.ssh2.transport.TransportManager.initialize(TransportManager.java:480)
    	at com.trilead.ssh2.Connection.connect(Connection.java:774)
    	... 9 more
    [10/17/17 15:11:25] Launch failed - cleaning up connection
    [10/17/17 15:11:25] [SSH] Connection closed.
    1. Wow this is recent