Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-63627

Add ability to tell which container is currently active

XMLWordPrintable

    • Icon: New Feature New Feature
    • Resolution: Fixed
    • Icon: Minor Minor
    • kubernetes-plugin
    • None
    • 1.28.6

      When writing pipeline libraries that utilize pod based agents, it would be useful to know a few bits about the pod and container currently running. Currently all you can get is pod name...kind of...

      The easiest way to accomplish this is to add a few env variables - for example:

      • JENKINS_CONTAINER - name of the currently active container
      • JENKINS_CONTAINERS - list of all containers in the pod

      It seems these should be easily injectable when switching containers

       

       

            vlatombe Vincent Latombe
            mlasevich Michael Lasevich
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: