adoroszlai opened a new pull request, #11627:
URL: https://github.com/apache/ozone/pull/11627

   ## What changes were proposed in this pull request?
   
   `.mvn/develocity.xml` currently enables:
   - local and remote build cache lookup
   - build scan collection
   - if authenticated (GitHub CI in `apache/ozone`): publishing build scans and 
saving to remote build cache
   
   Remote Develocity server is set to the ASF's instance.
   
   Changes proposed:
   - move existing config file to `.mvn/develocity-asf.xml`
   - create new `.mvn/develocity.xml`, which only enables local build cache, 
nothing else
   - use `.mvn/develocity-asf.xml` in CI via CLI options
   
   Developers can opt-in to using ASF's Develocity using the same options.
   
   Benefits:
   - avoid unintended usage of remote cache, which may falsify "reproducible 
build" results (e.g. in 
[reproducible-central|https://github.com/jvm-repo-rebuild/reproducible-central])
   - avoid local overhead and server-side load of remote cache lookups for 
builds that cannot possibly be cached there (e.g. company internal builds)
   - avoid overhead of scan data collection for local builds by default
   
   https://issues.apache.org/jira/browse/HDDS-17109
   
   ## How was this patch tested?
   
   Verified that local cache is enabled by default, but remote cache is not:
   
   ```
   $ mvn -N clean \
       -Dorg.slf4j.simpleLogger.log.develocity.goal.cache=debug
   ...
   [DEBUG] Develocity Maven Extension: 2.6.0
   [DEBUG] Using the build cache with the following configuration:
     Local build cache: enabled
         storeEnabled: true
         directory: ~/.m2/.develocity/build-cache
         cleanup: enabled
             retention: P7D
             interval: P1D
     Remote build cache: disabled:
         Build caching requires a Develocity server and none was specified.
   ...
   ```
   
   Verified remote cache is enabled via the property used in CI workflows:
   
   ```
   $ mvn -N clean \
       -Dorg.slf4j.simpleLogger.log.develocity.goal.cache=debug \
       -Ddevelocity.user.config=$(pwd)/.mvn/develocity-asf.xml
   ...
   [DEBUG] Develocity Maven Extension: 2.6.0
   [DEBUG] Using the build cache with the following configuration:
     Local build cache: enabled
         storeEnabled: true
         directory: ~/.m2/.develocity/build-cache
         cleanup: enabled
             retention: P7D
             interval: P1D
     Remote build cache: enabled
         url: https://develocity.apache.org/cache/
         authentication: none
         storeEnabled: false
   ...
   ```
   
   CI:
   https://github.com/adoroszlai/ozone/actions/runs/39220897550
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to