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

environmental variables are not set in Pre Build in maven project

XMLWordPrintable

    • Icon: Task Task
    • Resolution: Not A Defect
    • Icon: Major Major
    • maven-plugin
    • None
    • maven-plugin 2.14
      Jenkins 2.7.4

      After I add a custom Pre Build step(run a shell script) into a maven project and then build, once build starts, Jenkins would firstly pull the source from github into /var/lib/jenkins/workspace/myprojectname directory, so far so good.

      But once my Pre Build starts, which is running a shell script, I find the current directory becomes /var/lib/jenkins, thus the my Pre Build shell script is left outside of the project subdirectory and could not do the Pre Build appropriately. And build environment variables are not fully set by the system at this time.

      I hope after the Git pull, I will be in /var/lib/jenkins/workspace/myprojectname directory, or all the appropriate environmental variables are set.

            Unassigned Unassigned
            yushao Yu Shao
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: