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

Add ability to tell which container is currently active

    • 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

       

       

          [JENKINS-63627] Add ability to tell which container is currently active

          Michael Lasevich created issue -
          Vincent Latombe made changes -
          Remote Link New: This issue links to "PR #925 (Web Link)" [ 26412 ]
          Vincent Latombe made changes -
          Status Original: Open [ 1 ] New: In Progress [ 3 ]
          Vincent Latombe made changes -
          Status Original: In Progress [ 3 ] New: In Review [ 10005 ]
          Vincent Latombe made changes -
          Assignee New: Vincent Latombe [ vlatombe ]
          Vincent Latombe made changes -
          Resolution New: Fixed [ 1 ]
          Status Original: In Review [ 10005 ] New: Fixed but Unreleased [ 10203 ]
          Vincent Latombe made changes -
          Released As New: 1.28.6
          Status Original: Fixed but Unreleased [ 10203 ] New: Resolved [ 5 ]
          Michael Lasevich made changes -
          Link New: This issue is related to JENKINS-64643 [ JENKINS-64643 ]

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

              Created:
              Updated:
              Resolved: