Versioning with Tuttle

How to configure Tuttle?

If Tuttle is integrated within another application like e.g. TEI Publisher the configuration needs to be added to modules/config.xqm in the TEI Publisher instance.

Otherwise for running Tuttle in ‘Git to DB’ mode Tuttle is configured in modules/config.xqm in the TEI Publisher instance.

Below is an example configuration that shows an example for either Github and Gitlab. Due to the different API of these services the configuration differs sligtly. See parameter description below.

(:~
 : Git configuration
 :)
declare variable $config:collections := map {
            "sample-collection-github" : map {
                "vcs" : "github",
                "baseurl" : "https://api.github.com/",
                "ref" : "master",
                "token" : "146152be6a9xxxxxxxxxxx71da8f3e4faf263",
                "hookuser" :  "admin",
                "hookpasswd" : ""
                "owner" : "Jinntec",
                "repo" : "tuttle-demo"
            },
            "sample-collection-gitlab" : map {
                "vcs" : "gitlab",
                "baseurl" : "https://gitlab.com/api/v4/",
                "ref" : "master",
                "token" : "9vq6jmzxxxxxxxxxxobUfoM",
                "hookuser" :  "admin",
                "hookpasswd" : "",
                "project-id" : "25852323"
            }
        };


Common configuration parameters

Configuration ParameterDescription
vcscan be either ‘github’ or ‘gitlab’ and signifies the type of repository
baseurlthe base URL of the Git Service e.g. ‘https://api.github.com
refthe name of the branch to use
tokenthe authorization token for the Git service. This needs to be obtained for the respective service prior to operation.
hookuserthe user name used to talk to the service.
hookpasswdthe password for the hookuser

Github

Configuration ParameterDescription
ownerthe owning organisation in Github
repothe repository name within the organisation

The baseurl plus the above parameters are used to construct the URL to access the Github repository.

Gitlab

Configuration ParameterDescription
project-idGitlab identifier for the repository. Gitlab is using this id when being accessed via its API. It is listed on the homepage of the repository.

baseurl plus project-id are used to construct the URL to access the Gitlab repository.