Pipeline Cache Fixes

Merged Jason requested to merge fixing-pipeline-caches into master

All Submissions:

  • [YES/NO] Have you added an explanation of what your changes do and why you'd like us to include them?
  • [YES/NO] I have updated the documentation accordingly.
  • [YES/NO/NA] My code follows the code style of this project.

Current Behavior or Linked Issues

Relates to issue #73 (closed) and #74 (closed)

  • core code uses "install" maven goal. This puts the snapshot into the local repo, which is then cached. We only want to be caching the dependencies for a project, so we need to change the maven goal to "package" so that the built core code is not put in the local repository to be cached. UPDATE: this has to be done so that the core code is in the local repo when the provider code is building. If it is not there, then the core code jar will be pulled from opengroup package repo. Therefore the goal should be kept as install.
  • there is no cache for the test code. This means the test core and azure test code dependencies are pulled down every time the pipeline runs
  • there is not idea of a "version" in the current cache key. Adding in a version parameter allows for the potential to reset the cache either across all services by updating the "cacheVersion" parameter in this repo or reset the cache for a specific service by passing the parameter from the service pipeline .yml file. This is useful in case something accidently gets cached and we need to reset the cache (e.g, if core code accidently gets cached somehow)

Does this introduce a breaking change?

  • [YES/NO]

Other information

This code was tested with storage service in our dev ADO environment. The pipeline was ran twice to make sure that only dependencies were cached and that these cached dependencies were pulled correctly on the second run.

Edited by Jason

Merge request reports