Migrating Build Scan Data to the Standard Prefix


Use this procedure if you previously configured a custom object storage prefix for Build Scan data (for example, by setting the buildScanStorage.prefix advanced app parameter). For background and configuration details, see Deprecated S3 bucket prefix configuration.

The custom object storage prefix feature (buildScanStorage.prefix) was deprecated in Develocity 2023.2 and will be removed in a future release. If you are unsure whether this procedure applies to your installation, contact Develocity support.

  • If you use aws s3 sync --delete, objects can be deleted from the destination.
    Run the command with --dryrun first, and verify that the source and destination prefixes are correct.

  • To avoid missing late writes, perform the final sync while Develocity is stopped.

Before You Begin

  • Identify the source prefix (your custom prefix) and the destination prefix (build-scans) in the same bucket.

  • Choose a copy strategy that can mirror deletions from the source prefix to the destination prefix.

Procedure

  1. Decide on a copying strategy.

    For smaller datasets, you can use the AWS CLI s3 sync command:

    aws s3 sync --delete s3://example-bucket/custom-prefix/ s3://example-bucket/build-scans/

    For larger transfers, see AWS transfer strategies.

  2. While Develocity is running, run an initial sync to copy most data to the build-scans prefix.

  3. Remove the custom prefix override so Develocity uses the standard prefix.

    If you configure through the UI, remove the buildScanStorage.prefix advanced app parameter. Save, and restart if prompted.

    If you configure through unattended configuration, remove buildScanStorage.prefix and apply the change with helm upgrade. For details, see Standalone or Kubernetes.

  4. Stop Develocity.

    You can stop Develocity by running the develocityctl system stop command, or by scaling all deployments to zero replicas.

  5. Run the sync again to capture the final additions and deletions. If you used the aws s3 sync command suggested above, repeat it:

    aws s3 sync --delete s3://example-bucket/custom-prefix/ s3://example-bucket/build-scans/

    If you used a different copy strategy (for example, one of the AWS large transfer strategies), repeat that method instead to capture the remaining changes.

  6. Start Develocity.

    If you configure through the UI, you can start Develocity by running the develocityctl system start command, or by scaling deployments back to their original replica counts.

Verify and Clean Up

  1. Verify that recent Build Scans load correctly and that new Build Scans are written under the build-scans prefix.

  2. After verification, delete objects under the old prefix.

    aws s3 rm --recursive s3://example-bucket/custom-prefix/