Introducing WarpFleet™ Synchronizer

WarpFleet Synchronizer

WarpFleet™ Synchronizer is a Web server that aims to synchronize your Git repositories containing macros with your Warp 10 instance.

Warp 10 provides a powerful repository manager through the WarpFleet mechanism and especially the WarpFleet Resolver.

The main idea is to use a post-commit hook to run a synchronization. WarpFleet Synchronizer then runs a git clone/pull locally. Your Warp 10 instance uses WarpFleet Synchronizer as a WarpFleet Resolver backend.

Setup

At first get the source code here: https://github.com/senx/WarpFleetSynchronizer

git clone https://github.com/senx/WarpFleetSynchronizer.git
cd WarpFleetSynchronizer
./gradlew build
./gradlew shadowJar

Now you have to configure your first repo. Create a file conf.json:

{
  "host": "0.0.0.0",
  "port": 8082,
  "remotes": "*",
  "repos" : [
    {
      "name": "my-warpfleet-macros", // must be unique
      "url": "git@github.com:senx/my-warpfleet-macros.git",
      "passphrase": "sshPass"
    }
  ]
}

You can configure public or private repositories, HTTP(S) or git URLs, with ssh or user/password authentication.

Public repo:

{
    "name": "my-warpfleet-macros",
    "url": "https://github.com/senx/my-warpfleet-macros.git"
}

Private repo with ssh:

{
    "name": "my-warpfleet-macros",
    "url": "git@github.com:senx/my-warpfleet-macros.git"
}

Private repo with ssh and passphrase:

{
    "name": "my-warpfleet-macros",
    "url": "git@github.com:senx/my-warpfleet-macros.git",
    "passphrase": "sshPass"
}

Private repo with credentials:

{
    "name": "my-warpfleet-macros",
    "url": "https://github.com/senx/my-warpfleet-macros.git",
    "username": "homer",
    "password": "httpPass"
}

Run it

java -jar WarpFleetSynchronizer.jar ./path/to/conf.json

First run

At first, you have to synchronize your repo. You can use the dedicated endpoint (the post-commit webhook):

http://<ip of warpfleet sync>:8082/api/sync/my-warpfleet-macros

You can test if you reach your macro:

http://<ip of warpfleet sync>:8082/macros/my-warpfleet-macros/path/to/macro.mc2

Now setup Warp 10:

warpfleet.macros.repos = http://<ip of warpfleet sync>/macros

More info on warp10.io

Done!

Git webhook

WarpFleet Synchronizer exposes an API, especially this endpoint:

http://<ip of warpfleet sync>:8082/api/sync/my-warpfleet-macros

Use it to refresh your macros.

More info about APIs.

Share