Skip to content
Dockerized CLI application which allows to automatically sync different resources between commercetools projects
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
config/pmd
docs
gradle-scripts
gradle/wrapper
src
.gitignore
.travis.yml
README.md
build.gradle
docker-push.sh
gradlew
gradlew.bat
settings.gradle

README.md

commercetools-project-sync

Build Status codecov

Dockerized CLI application which allows to automatically sync different resources between commercetools projects

Prerequisites

  • Make sure you have JDK 8 installed.

  • The following fields are required to be set on the following resources (and sub-resources) that should be synced:

    • Product
      • key
      • Variant
        • key
        • Asset
          • key
    • ProductType
      • key
    • Category
      • key
  • Set the following environment variables before running the application

    export SOURCE_PROJECT_KEY = xxxxxxxxxxxxx
    export SOURCE_CLIENT_ID = xxxxxxxxxxxxxxx
    export SOURCE_CLIENT_SECRET = xxxxxxxxxxx
    export TARGET_PROJECT_KEY = xxxxxxxxxxxxx
    export TARGET_CLIENT_ID = xxxxxxxxxxxxxxx
    export TARGET_CLIENT_SECRET = xxxxxxxxxxx

Usage

usage: commercetools-project-sync
 -h,--help         Print help information.
 -s,--sync <arg>   Choose one of the following modules to run: "types", "productTypes", "categories", "products", "inventoryEntries" or "all" (will run all the modules).
 -v,--version      Print the version of the application.

Running the Docker Image

Download
docker pull commercetools/commercetools-project-sync:1.1.0
Run
docker run \
-e SOURCE_PROJECT_KEY=xxxx \
-e SOURCE_CLIENT_ID=xxxx \
-e SOURCE_CLIENT_SECRET=xxxx \
-e TARGET_PROJECT_KEY=xxxx \
-e TARGET_CLIENT_ID=xxxx \
-e TARGET_CLIENT_SECRET=xxxx \
commercetools/commercetools-project-sync:1.1.0 -s all

Examples

  • To run the all sync modules from a source project to a target project
    docker run commercetools/commercetools-project-sync:1.1.0 -s all
    This will run the following sync modules in the given order:
  1. Type Sync and ProductType Sync in parallel.
  2. Category Sync.
  3. Product Sync.
  4. InventoryEntry Sync.
  • To run the type sync

    docker run commercetools/commercetools-project-sync:1.1.0 -s types
  • To run the productType sync

    docker run commercetools/commercetools-project-sync:1.1.0 -s productTypes
  • To run the category sync

    docker run commercetools/commercetools-project-sync:1.1.0 -s categories
  • To run the product sync

    docker run commercetools/commercetools-project-sync:1.1.0 -s products
  • To run the inventoryEntry sync

    docker run commercetools/commercetools-project-sync:1.1.0 -s inventoryEntries
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.