Skip to content

Migrating Helm Charts from AWS S3 bucket to JFrog Artifactory

Given there isn't an integrated tool to help with the Helm Chart migration, the high-level process is downloading the helm charts to the build agent pool and uploading each of them from there to Artifactory.

The instructions below should help outline and clarify what needs to be done to ensure a successful migration. Note: The code outlined below is for a Powershell script.

Setup

You will need to create a repository in which you can write a yaml script to carry out the artifact migration. If there is an existing repository that will work, then feel free to update the existing yaml script with the commands outlined below.

Once you have your yaml script created/open, it will be helpful to create variables with all the necessary credentials for the migration.

Downloading helm charts from AWS S3 bucket

Downloading helm charts from AWS S3 bucket is simple with built-in S3 Download task. Set up the S3Download@1 task as shown below.Choose the correct AWS service connection and S3 buket name to download the helm charts to the desired target folder of the agent.

- task: S3Download@1
      inputs:
        awsCredentials: '[YOUR-AWS-SERVICE-CONNECTION]'
        regionName: 'us-east-1'
        bucketName: '[YOUR-BUCKET-NAME]'
        globExpressions: '**'
        flattenFolders: true
        targetFolder: '$(System.ArtifactsDirectory)'

Migrating to Jfrog Artifactory

Migrating the artifacts to Artifactory is easiest with the built-in JFrog CLI task. Set up the JfrogCLIV2@1 task as shown below. Choose the correct JFrog platform connection and use the jf rt u command to upload the artifacts to the desired repository within Artifactory.

- task: JfrogCliV2@1
      inputs:
        jfrogPlatformConnection: '[YOUR-SERVICE-CONNECTION]'
        command: 'jf rt u "*" [YOUR-REPO]/'
        workingDirectory: '$(System.ArtifactsDirectory)

For a full example of the migration script, refer to "this page"