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

Incorrect home directory is used for triggered downstream job

XMLWordPrintable

    • Blue Ocean 1.1-beta4

      I have two jobs: CI (multibranch pipeline job) and Deploy (pipeline job).

      CI triggers Deploy via pipeline build step:

       

      build job: 'Deploy', parameters: [
          string(name: 'deployBranch', value: 'develop'),
          string(name: 'deployEnv', value: 'dev')
      ]
      

      when

      CI job is run by default using jenkins user with configured default home directory /var/jenkins_home. But triggered Deploy job is run by the same jenkins user BUT in directory /home/jenkins. Of course, there is no any workspace folder there and Deploy job fails.

      When I rerun Deploy job manually it is run with correct home directory /var/jenkins_home and * successfully * deploys my artifacts.

       

      Why is home directory changed? And how to prevent it or force the correct one?

       

            abeletsky Andrey Beletsky
            abeletsky Andrey Beletsky
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: