Uploaded image for project: 'Bitbucket Cloud'
  1. Bitbucket Cloud
  2. BCLOUD-18992

Implement automated dependency cache invalidation

    XMLWordPrintable

Details

    • Our product teams collect and evaluate feedback from a number of different sources. To learn more about how we use customer feedback in the planning process, check out our new feature policy.

    Description

      This feature request arises from the response to this question: https://community.atlassian.com/t5/Bitbucket-Pipelines-questions/Can-a-dependency-cache-cause-incorrect-builds/qaq-p/1116127

      The proposed feature would allow a given dependency cache to be linked to a file in the repository such that if there are any changes to that file in the current commti, the associated cache is cleared before any pipeline steps start.

      I see two options for how to implement this;

      Option 1: In the bitbucket-pipelines.yml file

      I.e.

      definitions:
        caches:
          node-modules: 
            directory: app/node_modules
            invalidated-by: app/package-lock.json
      

      One drawback of this approach is that there is no obvious way to associate a file with a pre-defined cache (i.e. I want to invalidate the default node cache based on package-lock.json). Maybe could get round this issue with this (no directory is specified);

      definitions:
        caches:
          node: 
            invalidated-by: package-lock.json
      

      Option 2: Create a new configuration page in the web interface


      The contents of the page would be a form-based version of the settings proposed in Option 1 above. This option would perhaps make it easier to manage the contrasts between pre-defined caches and custom caches.

      I think I’d prefer option 1 but without knowing more about the underlying architecture of Pipelines I can't know if either option is significant harder to implement.

      Cheers.

      Attachments

        Activity

          People

            Unassigned Unassigned
            397b694c1f8f Geoff Clayton
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: