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

Allow executing scripts in JobProperty.prebuild phase

    • Icon: New Feature New Feature
    • Resolution: Unresolved
    • Icon: Major Major
    • envinject-plugin
    • None

      If you start a build on a bare-OS slave environment (no JDK, no Maven), store environment definition in the SCM and use a Maven project, you are faced with the following problems:

      • environment cannot be populated by the "Prepare an environment for the run" section because it's executed before SCM.
      • Maven project requires Maven environment to be available before any of the wrappers get triggered.

      Since at that point Maven is not available, the build fails.

      The JobProperty.prebuild method is, however, executed very appropriately by the AbstractBuildExecution: after SCM and right before AbstractBuildExecution.doRun is invoked.

      This feature allows executing scripts in a JobProperty.prebuild phase and thus would allow code delivered by SCM to build the environment, in doing so create Maven for Maven Project to use and to allow a build to proceed normally.

          [JENKINS-25223] Allow executing scripts in JobProperty.prebuild phase

          There are no comments yet on this issue.

            arcivanov Arcadiy Ivanov
            arcivanov Arcadiy Ivanov
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: