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

SCM Configuration in Pipeline Jobs

    Details

    • Similar Issues:

      Description

      A pipeline job configuration has references to two kinds of URLs:

      • Repository location that contain the pipeline script
      • Repository location that contain other files. No script but files used during build process.

      The current version of Jenkins/Pipeline makes no difference. Because of this, all the repository locations are checked out 2 times:

      • First, all is checked out in the JobName@script folder
      • Second, all is checked out again in JobName folde

      Usually the repository location containing the script contains few and small files. However, the rest of the repository locations contain many files and folder and takes a long time to checkout / update.  This leads to a longer time to build.

      The time to build could be improved by checking out at the beginning only the repository location that contains the script (in the JobName@script folder) . An additional parameter in the configuration must be added to identify which URL(s) contains the script. The other repository locations should be checked out only once in the workspace folder (JobName folder)

        Attachments

          Activity

          Hide
          abayer Andrew Bayer added a comment -

          It's worth mentioning that multibranch jobs, at least with some SCM sources (including GitHub), do a lightweight checkout of just the Jenkinsfile initially, and only check everything else out when an explicit checkout scm call is made. That may be something that can be done for CpsScmFlowDefinition as well.

          Show
          abayer Andrew Bayer added a comment - It's worth mentioning that multibranch jobs, at least with some SCM sources (including GitHub), do a lightweight checkout of just the Jenkinsfile initially, and only check everything else out when an explicit checkout scm call is made. That may be something that can be done for CpsScmFlowDefinition as well.

            People

            • Assignee:
              Unassigned
              Reporter:
              albertosavila Alberto Sanchez
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: