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

Incorrect home directory is used for triggered downstream job

    • 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?

       

          [JENKINS-43957] Incorrect home directory is used for triggered downstream job

          Andrew Bayer added a comment -

          That is very strange. Can you include your upstream and downstream Jenkinsfiles, please?

          Andrew Bayer added a comment - That is very strange. Can you include your upstream and downstream Jenkinsfiles, please?

          It seems to be not an issue anymore. We use the latest version of Jenkins and Blue Ocean plugin(s).

          Andrey Beletsky added a comment - It seems to be not an issue anymore. We use the latest version of Jenkins and Blue Ocean plugin(s).

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

              Created:
              Updated:
              Resolved: