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

Env var HOME for containers has regressed

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • kubernetes-plugin
    • None
    • Jenkins ver. 2.7.21.0.1 (CloudBees Jenkins Enterprise 2.7.21.0.1-fixed)
      Kubernetes plugin version 0.9
    • 1.17.0

      Since version 0.7 of kubernetes-plugin, due to PR https://github.com/jenkinsci/kubernetes-plugin/pull/57, a change was made that I think is specific to some kubernetes cloud environments (openshift), but not all.

      For instance, I have a Jenkins instances connected to a kubernetes cluster, and don't want HOME to be set to working directory.

       

      I also saw https://github.com/jenkinsci/kubernetes-plugin/pull/128 that attempted to address some points, but (correct me if I am wrong), we'd still need to set HOME on each pod template.

       

      I think a better way of fixing the problem would be to introduce a checkbox on the cloud config level ... that says something to the effect of "Ensure functional HOME folder" (to begin with). Such a param would remove the need for each pod template to be configured ... and yet allow Jenkins admin(s) to get the desired effect in case of openshift.

       

      Needless to say, this would be conditional:

      env.put("HOME", containerTemplate.getWorkingDir());
      

            vlatombe Vincent Latombe
            paragdoke Parag Doke
            Votes:
            3 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved: