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

Use the same Jenkins workspace on a Change basis

      Building occurs in a separate Jenkins workspace for every single Patchset, rather than being done on a Change basis.

       

      There doesn't seem to be any configuration to specify this, but there should be - caching unchanged build artefacts from build to build is an easy way to speed up build times and vastly reduce disk space required on build servers.

          [JENKINS-58958] Use the same Jenkins workspace on a Change basis

          isaac mann created issue -
          isaac mann made changes -
          Component/s New: gerrit-code-review-plugin [ 23427 ]
          Component/s Original: github [ 18925 ]
          Key Original: INFRA-2215 New: JENKINS-58958
          Workflow Original: classic default workflow [ 238706 ] New: JNJira + In-Review [ 238707 ]
          Project Original: Infrastructure [ 10301 ] New: Jenkins [ 10172 ]
          isaac mann made changes -
          Assignee Original: Daniel Beck [ danielbeck ] New: Luca Domenico Milanesio [ lucamilanesio ]

          The behaviour you see is a consequence of how Gerrit stores patch-sets, which is different from the way GitHub (for example) stores PRs.

          Gerrit has a different ref for every patch-set, which results in a different build and workspace. GitHub, instead, uses the same ref (e.g. refs/pull/N/head) and thus has the same workspace.

          Luca Domenico Milanesio added a comment - The behaviour you see is a consequence of how Gerrit stores patch-sets, which is different from the way GitHub (for example) stores PRs. Gerrit has a different ref for every patch-set, which results in a different build and workspace. GitHub, instead, uses the same ref (e.g. refs/pull/N/head) and thus has the same workspace.

          How Gerrit internally stores and references Patchsets should be orthogonal to how we want to handle them in Jenkins/BlueOcean.

          Andreas Fritiofson added a comment - How Gerrit internally stores and references Patchsets should be orthogonal to how we want to handle them in Jenkins/BlueOcean.

          Generally speaking, yes. However, this plugin uses the multi-branch pipeline which has a 1:1 representation between a child job and a branch. Because the branch is different, then the job is different.

          Does that makes sense?

          For reusing cached results of past builds, have you looked at Bazel?

          Luca Domenico Milanesio added a comment - Generally speaking, yes. However, this plugin uses the multi-branch pipeline which has a 1:1 representation between a child job and a branch. Because the branch is different, then the job is different. Does that makes sense? For reusing cached results of past builds, have you looked at Bazel?
          Sten Olsson made changes -
          Link New: This issue duplicates JENKINS-49897 [ JENKINS-49897 ]
          Sten Olsson made changes -
          Link New: This issue is related to JENKINS-62816 [ JENKINS-62816 ]

            lucamilanesio Luca Domenico Milanesio
            isaacmann isaac mann
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: