{"id":19149800,"url":"https://github.com/harness/harness-migrate","last_synced_at":"2026-04-01T18:43:41.455Z","repository":{"id":153126987,"uuid":"599343555","full_name":"harness/harness-migrate","owner":"harness","description":"Harness CI migration utility","archived":false,"fork":false,"pushed_at":"2025-05-07T01:40:49.000Z","size":16090,"stargazers_count":10,"open_issues_count":16,"forks_count":8,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-05-07T04:44:41.602Z","etag":null,"topics":["continuous-integration","golang"],"latest_commit_sha":null,"homepage":"https://www.harness.io/products/continuous-integration","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/harness.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2023-02-09T00:01:36.000Z","updated_at":"2025-05-02T04:25:48.000Z","dependencies_parsed_at":null,"dependency_job_id":"48e655e1-486c-4376-8276-3bf3d6cbdae9","html_url":"https://github.com/harness/harness-migrate","commit_stats":null,"previous_names":[],"tags_count":44,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/harness%2Fharness-migrate","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/harness%2Fharness-migrate/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/harness%2Fharness-migrate/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/harness%2Fharness-migrate/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/harness","download_url":"https://codeload.github.com/harness/harness-migrate/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252816520,"owners_count":21808702,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["continuous-integration","golang"],"created_at":"2024-11-09T08:09:39.518Z","updated_at":"2026-04-01T18:43:41.448Z","avatar_url":"https://github.com/harness.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Harness Migrator\n\n**harness-migrate** is a command line utility to help convert and migrate\ncontinuous integration pipelines from other providers to Harness CI. You can use this tool to migrate repositories following guidlines [below](#migrate-repositories).\n\n**Please review [known conversion and migration issues](KNOWN_ISSUES_CONVERT.md\n) before using this tool.**\n\n## Migrate Repositories\n\nMigrating repositories is a two-step process. \n\n1. **Export**: Use `git-export` to export repositories with metadata from your current SCM provider. Guidlines for [Bitbucket On-perm](cmd/stash/README.md), [GitHub](cmd/github/README.md), [Gitlab](cmd/gitlab/README.md), and [Bitbucket](cmd/bitbucket/README.md). The exported data will be saved in a zip file.\n\n   **[OPTIONAL]** Use the `update-users` command to map user emails in the exported data to their corresponding Harness emails. See [documentation](cmd/users/README.md) for details. Without this step, unmatched emails will default to the migrator user.\n\n2. **Import**: Import the exported data into Harness CODE using `git-import` command as explained [here](cmd/gitimporter/README.md).\n\n### Using Docker\n\nThe migrator is available as a Docker image with all required dependencies pre-installed. Follow these steps:\n\n1. Build and run the container:\n```sh\ndocker build -t harness-migrate .\ndocker volume create migrator-data\ndocker run -it --name harness-migrate -v migrator-data:/data harness-migrate\n```\n\n2. Inside the container, run your export/import commands:\n```sh\n# Export example\nharness-migrate [SCM-Provider] git-export [flags]\n\n# Import example\nharness-migrate git-import [flags]\n```\n\nNote: All data is stored in the Docker volume `migrator-data` which persists even if you stop or remove the container. To clean up after you're done:\n```sh\ndocker rm migrator\ndocker volume rm migrator-data\n```\n\n## Migrate Continuous Integration Pipelines \n\n## Install on Mac\n\nIntel CPU\n\n```sh\ncurl -L https://github.com/harness/harness-migrate/releases/latest/download/harness-migrate-darwin-amd64.tar.gz | tar zx\n```\n\nApple silicon (M1 or M2) CPU\n\n```sh\ncurl -L https://github.com/harness/harness-migrate/releases/latest/download/harness-migrate-darwin-arm64.tar.gz | tar zx\n```\n\nCopy the binary into place\n\n```sh\nsudo cp harness-migrate /usr/local/bin\n```\n\nVerify the install\n\n```sh\nharness-migrate --help\n```\n\n## Build\n\n```term\n$ git clone https://github.com/harness/harness-migrate.git\n$ cd harness-migrate\n$ go build\n```\n\n## Usage\n\n### Drone\n\nConvert a drone pipeline:\n\n```term\nharness-migrate drone convert /path/to/.drone.yml\n```\n\nExport a github namespace from drone:\n\n```term\nharness-migrate drone export \\\n  --namespace example \\\n  --github-token $GITHUB_TOKEN \\\n  export.json\n```\n\n❗ To avoid pipelines triggering in both your Drone instance and in Harness CI, you must first deactivate the pipelines in your Drone instance.\n\nThis script uses [jq](https://jqlang.github.io/jq/) and the [Drone CLI](https://docs.drone.io/cli/install/) to disable all pipelines defined in your `export.json`:\n\n```bash\n#!/bin/bash\n\nDRONE_NAMESPACE=$(jq -r .name export.json)\nfor REPO_NAME in $(jq -r .project[].name export.json); do\n  drone repo disable $DRONE_NAMESPACE/$REPO_NAME\ndone\n```\n\nImport a drone namespace:\n\n```term\nharness-migrate drone import \\\n  --harness-account $HARNESS_ACCOUNT \\\n  --harness-org example \\\n  --docker-connector account.harnessImage \\\n  --github-token $GITHUB_TOKEN \\\n  export.json\n```\n\n### BitBucket\n\nConvert a bitbucket pipeline:\n\n```term\nharness-migrate bitbucket convert /path/to/bitbucket-pipelines.yml\n```\n\n### CircleCI\n\nConvert a circle pipeline:\n\n```term\nharness-migrate circle convert /path/to/.circle/config.yml\n```\n\n### GitHub Actions\n\nConvert a github pipeline:\n\n```term\nharness-migrate github convert /path/to/.github/workflows/main.yml\n```\n\n### GitLab\n\nConvert a gitlab pipeline:\n\n```term\nharness-migrate gitlab convert /path/to/.gitlab-ci.yml\n```\n\n### Terraform\n\nGenerate terraform configuration from an export, and apply it to your Harness account:\n\n```term\n$ harness-migrate terraform \\\n  --account $HARNESS_ACCOUNT \\\n  --docker-connector account.harnessImage \\\n  --org $HARNESS_ORG \\\n  --repo-connector $HARNESS_REPO_CONNECTOR \\\n  export.json \\\n  output.tf\n$ terraform init\n$ terraform apply\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fharness%2Fharness-migrate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fharness%2Fharness-migrate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fharness%2Fharness-migrate/lists"}