fstrigger/config.yml

69 lines
1.8 KiB
YAML
Raw Normal View History

2021-08-11 11:46:05 +02:00
mail:
host: localhost:25
2021-08-10 16:56:44 +02:00
directories:
- path: /tmp/foo
recursive: false
2021-08-10 18:31:29 +02:00
events: ["CLOSE_WRITE", "MOVED_TO"]
pollingInterval: 60
2021-08-10 16:56:44 +02:00
regex: "/[^\\.][^/]+.xml$"
actions:
2021-08-11 11:46:05 +02:00
- id: postXML
description: POST xml
type: http
2021-08-10 18:31:29 +02:00
method: post
url: http://localhost:8080/api/v1/_/renz_einfo/xml
header:
Token: Ksi02vcaHHasd1sjYxiq4J
ContentType: application/xml
# content: PLAIN IS FILECONTENT
onError:
2021-08-11 11:46:05 +02:00
- id: moveXMLError
description: MOVE xml to error dir
type: move
2021-08-10 16:56:44 +02:00
to: /tmp/error/{{ filename }}
2021-08-11 11:46:05 +02:00
- id: mailXMLError
description: eInfo Import ERROR on POST xml
type: mail
to: sebastian@webmakers.de
subject: "{{ action.Description }}"
body: |
path: {{ path }}
event: {{ event }}
http status: {{ context.postXML.response.Status }}
http response body
------------------
{{ context.postXML.response.Body }}
from: noreply@webmakers.de
2021-08-10 16:56:44 +02:00
stop: true
2021-08-10 18:31:29 +02:00
onSuccess:
2021-08-11 11:46:05 +02:00
- id: deleteXML
description: DELETE xml after POST
type: delete
2021-08-10 18:31:29 +02:00
- path: /tmp/foo
recursive: false
events: ["CLOSE_WRITE", "MOVED_TO"]
regex: "/[^\\.][^/]+.(png|jpe?g|pdf)$"
actions:
- type: http
method: post
url: http://localhost:8080/api/v1/_/renz_einfo/operation-file
header:
Token: Ksi02vcaHHasd1sjYxiq4J
Content-Type: application/json
content: |
{
"filename": "{{ filename }}"
}
onError:
- type: move
2021-08-10 16:56:44 +02:00
to: /tmp/error/{{ filename }}
stop: true
2021-08-10 18:31:29 +02:00
- type: log