Skip to content

Commit c70514e

Browse files
committed
Add readme.md
1 parent 7a02c8f commit c70514e

File tree

1 file changed

+56
-0
lines changed

1 file changed

+56
-0
lines changed

README.md

+56
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
# uSync Triggers
2+
3+
uSync triggers is an add on package for uSync that allows you to remotely trigger usync import or exports. The intention is this will help with CI/CD workflows - where you can trigger the import
4+
once your site is up, or after a warm up/slot swap for example.
5+
6+
## Installation
7+
8+
```
9+
dotnet add package uSync.Triggers
10+
```
11+
12+
## uSyncTriggerCLI
13+
14+
The triggers package exposes an end point that you can call with CURL commands, to trigger the processes, but for neatness and for nicer formatted results you can use the uSyncTriggerCLI which is a .net tool that you can install (standalone or as part of a build/release script).
15+
16+
```
17+
dotnet tool install uSyncTriggerCLI
18+
```
19+
20+
You can then trigger an import/export from the command line
21+
22+
# Note : v9 only suppports HMAC auth (at the moment)
23+
24+
## HMAC Auth
25+
Using the Command line tool , you can use HMAC signiture authentication to trigger the tool (and then you don't have to use a username/password from your setup if you don't want to.)
26+
27+
```
28+
usynctrigger seed
29+
```
30+
31+
Will generate a hmac key that you can use in the below setup:
32+
33+
in the site's appsettings.json :
34+
35+
```json
36+
"uSync": {
37+
"Triggers": {
38+
"Enabled": true,
39+
"Key": "YOUR_HMAC_KEY"
40+
}
41+
}
42+
```
43+
44+
You can then use the CLI tool to call the end point and have it use a generate and use a HMAC signature:
45+
46+
```
47+
usynctrigger import https://mysite-url/umbraco -h [HMACKEY]
48+
```
49+
50+
HMAC auth method will use the default Umbraco user for all operations
51+
52+
--
53+
54+
55+
n.b - you can only run uSync.triggers in basic OR HMAC mode not both at the same time.
56+

0 commit comments

Comments
 (0)