Loading

WarpFleet™ Synchronizer

This Web server aims to synchronize git repositories and serve macros for the WarpFleet™ resolver.

You can configure Warp 10 with it by setting warpfleet.macros.repos in path/to/warp10/etc/conf.d/20-warpfleet.conf:

// Comma separated list of default WarpFleet™ repositories
warpfleet.macros.repos = https://warpfleet.senx.io/macros,http://<warpfleet.synchronizer.url>:8080/macros

Configuration sample

{
  "host": "0.0.0.0",
  "port": 8080,
  "remotes": "www.myWebSite.com", // independant of your Warp 10 instance, for admin purpose
  "repos" : [
    {
      "owner": "hammet",
      "name": "warpfleet-macros", // must be unique
      "url": "git@gitlab.com:senx/warpfleet-macros.git",
      "passphrase": "sshPass"
    },
    {
      "owner": "hetfield",
      "name": "warpfleet-macros2",
      "url": "https://gitlab.com/senx/warpfleet-macros.git",
      "username": "oauth2",
      "password": "<gitlab oAuth Token>",
      "branch": "main"
    }
  ]
}

Some authentication samples

Public repo

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

Private repository with ssh

You may have an SSH key deployed on your server.

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

Private repository with SSH and passphrase

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

Private repository with credentials

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

Docker

docker run -d -v /path/to/conf.json:/data/conf.json -p 8888:8080 warp10io/warpfleetsynchronizer:latest

Usage

Test in your browser

http://localhost:8080/macros/<repo name>/path/to/macro.mc2

Call a macro from a WarpScript

@<repo name>/path/to/macro

API

Sync all

http://localhost:8080/api/sync

Sync specific repo

http://localhost:8080/api/sync/<repo name>

List repositories

http://localhost:8080/api/repos/<owner>