Skip to content

Adding Secure Files object storage migration rake task

What does this MR do and why?

Adds a rake task to migrate Secure Files from local storage to object storage.

Closes gitlab-org/incubation-engineering/mobile-devops/readme#125 (closed)

How to set up and validate locally

  1. Ensure Secure Files object storage is disabled via gdk.yml

    object_store:
      enabled: true
  2. Follow the instructions in the docs to upload one or more Secure Files to a project.

  3. Create the ci-secure-files bucket in your local object storage (http://127.0.0.1:9000 if using minio)

  4. Reconfigure GDK to use object storage for Secure Files changing gdk.yml, then run gdk reconfigure; gdk restart.

    object_store:
      enabled: true
  5. Run the rake task bundle exec rake gitlab:ci_secure_files:migrate

  6. The output should be similar to this example:

I, [2023-06-05T11:28:11.577904 #39705]  INFO -- : Starting transfer of Secure Files to object storage
I, [2023-06-05T11:28:11.617101 #39705]  INFO -- : Transferred Secure File ID 68 (upload-keystore.jks) to object storage
I, [2023-06-05T11:28:11.620536 #39705]  INFO -- : Transferred Secure File ID 69 (sample.p12) to object storage

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Darby Frey

Merge request reports

Loading