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

          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?

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

              Created:
              Updated: