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.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Alternatively, you can modify `/db/apps/tuttle/data/tuttle.xml`_and_`test/fixtures/alt-tuttle.xml` to include your tokens. But remember to never commit them!
56
+
57
+
Run tests with ```npm test```
43
58
44
59
## Configuration
45
60
46
61
Tuttle is configured in `data/tuttle.xml`.
47
62
48
-
### Gitservice configuration
49
-
@name is always the name of the destination collection. It will be configured in `data/tuttle.xml`
63
+
New with version 2.0.0:
64
+
65
+
A commented example configuration is available `data/tuttle-example-config.xml`.
66
+
If you want to update tuttle your modified configuration file will be backed up to
67
+
`/db/tuttle-backup/tuttle.xml` and restored on installation of the new version.
68
+
69
+
Otherwise, when no back up of an existing config-file is found, the example configuration is copied to `data/tuttle.xml`.
70
+
71
+
> [!TIP]
72
+
> When migrating from an earlier version you can copy your existing configuration to the backup location:
The repositories to keep in sync with a gitservice are all listed under the repos-element.
78
+
79
+
The name-attribute refers to the **destination collection** also known as the **target collection**.
80
+
81
+
#### Collection
82
+
83
+
An example: `<collection name="tuttle-sample-data">`
84
+
The collection `/db/apps/tuttle-sample-data` is now considered to be kept in sync with a git repository.
50
85
51
-
An example:
52
86
```xml
53
-
<repos>
54
-
<collectionname="tuttle-sample-data">
55
-
<default>true</default>
56
-
<type>github</type>
57
-
<baseurl>https://api.github.com/</baseurl>
58
-
<repo>tuttle-sample-data</repo>
59
-
<owner>tuttle-sample-data</owner>
60
-
<token></token>
61
-
<ref>master</ref>
62
-
<hookuser>admin</hookuser>
63
-
<hookpasswd></hookpasswd>
64
-
</collection>
65
-
66
-
<collectionname="tuttle-sample-gitlab">
67
-
<type>gitlab</type>
68
-
<baseurl>https://gitlab.com/api/v4/</baseurl>
69
-
<project-id>tuttle-sample-data</project-id>
70
-
<token>XXX</token>
71
-
<ref>master</ref>
72
-
<hookuser>admin</hookuser>
73
-
<hookpasswd></hookpasswd>
74
-
</collection>
75
-
</repos>
87
+
<collectionname="tuttle-sample-data">
88
+
<default>true</default>
89
+
90
+
<type>github</type>
91
+
<baseurl>https://api.github.com/</baseurl>
92
+
93
+
<repo>tuttle-sample-data</repo>
94
+
<owner>tuttle-sample-data</owner>
95
+
96
+
<token>a-personal-access-token</token>
97
+
98
+
<ref>a-branch</ref>
99
+
100
+
<hookuser>a-exist-user</hookuser>
101
+
<hookpasswd>that-users-password</hookpasswd>
102
+
</collection>
76
103
```
77
104
78
105
#### type
79
-
Gitserver type: 'github' or 'gitlab'
80
106
81
-
#### baseurl
82
-
* For github the baseurl is always api.github.com
83
-
* For gitlab the url can also be your private gitlab server egg 'https://gitlab.existsolutions.com/api/v4/'
107
+
```xml
108
+
<type>gitlab</type>
109
+
```
110
+
111
+
There are two supported git services at the moment `github` and `gitlab`
112
+
113
+
#### baseurl
114
+
115
+
```xml
116
+
<baseurl>https://api.server/</baseurl>
117
+
```
118
+
119
+
* For github the baseurl is `https://api.github.com/` or your github-enterprise API endpoint
120
+
* For gitlab the baseurl is `https://gitlab.com/api/v4/` but can also be your private gitlab server egg 'https://gitlab.existsolutions.com/api/v4/'
121
+
122
+
#### repo, owner and project-id
123
+
124
+
* For github you **have to** specify the owner and the repo
125
+
* For gitlab you **have to** specify the project-id of the repository
84
126
85
-
#### repo, owner and project-id
86
-
* For github you have to specify the owner and the repo
87
-
* For gitlab you have to specify the project-id of the repository
88
127
89
-
#### ref
90
-
Define the working branch of the git repository
128
+
#### ref
129
+
130
+
```xml
131
+
<ref>main</ref>
132
+
```
133
+
134
+
Defines the branch you want to track.
91
135
92
136
#### hookuser & hookpasswd
93
137
94
138
#### token
95
139
96
140
If a token is specified Tuttle authenticates against GitHub or GitLab. When a token is not defined, Tuttle assumes a public repository without any authentication.
97
141
98
-
It is also possible to pass the token via an environment variable. The name of the variable have to be `tuttle_token_ + collection` (all dashes must be replaces by underscore). Example: `tuttle_token_tuttle_sample_data`
99
-
100
-
Be aware of the rate limits
101
-
* GitHub:
102
-
* 60 unauthenticated requests per hour
103
-
* 5,000 authenticated requests per hour
142
+
> [!NOTE]
143
+
> Be aware of the rate limits for unauthenticated requests
144
+
> GitHub allows 60 unauthenticated requests per hour but 5,000 for authenticated requests
104
145
146
+
> [!TIP]
147
+
> It is also possible to pass the token via an environment variable. The name of the variable have to be `tuttle_token_ + collection` (all dashes must be replaces by underscore). Example: `tuttle_token_tuttle_sample_data`
105
148
106
149
##### Create API-Keys for Github / Gitlab
107
150
@@ -123,17 +166,22 @@ The dashboard can trigger a full deployment or an incremental update.
123
166
Full deployment clones the repository from git and install it as a `.xar` file.
124
167
With incremental update only the changes to the database collection are applied.
125
168
169
+
> [!NOTE]
170
+
> Tuttle is built to keep track of **data collections**
171
+
172
+
> [!NOTE]
173
+
> Tuttle is does not run pre- or post install scripts nor change the index configuration on incremental updates!
174
+
126
175
### Lets start
127
176
128
-
1) customize the configuration (`modules/config.xql`)
177
+
1) customize the configuration (`data/tuttle.xml`)
129
178
2) click on 'full' to trigger a full deployment from git to existdb
130
179
3) now you can update your collection with a click on 'incremental'
131
180
132
181
Repositories from which a valid XAR (existing `expath-pkg.xml` and `repo.xml`) package can be generated are installed as a package, all others are created purely on the DB.
133
182
134
-
**REMARK: Note that there may be index problems if a collection is not installed as a package.**
135
-
136
-
**REMARK: Only use it with data collections**
183
+
> [!NOTE]
184
+
> Note that there may be index problems if a collection is not installed as a package.
137
185
138
186
## API
139
187
@@ -243,10 +291,9 @@ be obtained from the respective service.
243
291
244
292
The key for the gitservice must be configured in Gitservice configuration as shown above.
0 commit comments