From bad5cc1895d6894cc95a512f05e8c2408d542e60 Mon Sep 17 00:00:00 2001 From: "Stanislav N. aka pztrn" Date: Mon, 27 Sep 2021 18:03:17 +0500 Subject: [PATCH] Documentational commit. --- README.md | 8 ++++++-- config.example.yaml | 25 ++++++++++++++++++++++++- 2 files changed, 30 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 3e125c2..4f74b48 100644 --- a/README.md +++ b/README.md @@ -14,8 +14,12 @@ Head over releases page, grab your binary and configure your system to start bin ### Using Docker image -To be written :). +Compose a configuration file (read below) and add this to your cron: + +```shell +docker run --rm -v ./config.yaml:/periodicator.yaml registry.gitlab.pztrn.name/pztrn/periodicator:latest +``` ## Configuring -To be written :). +See config.example.yaml file in repository's root with configuration file structure and parameters description. diff --git a/config.example.yaml b/config.example.yaml index 1e3ef2b..db194c0 100644 --- a/config.example.yaml +++ b/config.example.yaml @@ -1,14 +1,37 @@ +# Gitlab's configuration. gitlab: + # Base URL (a.k.a. "protocol and domain") for your Gitlab installation. base_url: "https://gitlab.com" + # Personal access token with "api" access. token: "aaabbbccc" +# Tasks list to create. It is using YAML's lists. tasks: + # Task's title. - title: "Test" + # Task's body. Can be multiline. + body: | + This is a multiline + task + body + + # Tags (or labels) to attach. + tags: ["test label"] + # Task's starting point. From this timestamp "internal cron" will start to calculate task creation timestamp and other + # things. + execution_start: "2021-09-01 00:00:00" + # Internal cron interval. For this example 2021-09-01 is wednesday, so task will be created on 2021-09-03 and + # then on 2021-09-10 and so on. + cron: "00 5 * * fri" + # Due date to set in future. For this example task will be created on 2021-09-03 and due date will be set to 2021-09-04. + due_in: "24h" + + - title: "Another Test" body: | This is a multiline task body tags: ["test label"] execution_start: "2021-09-01 00:00:00" - cron: "00 5 * * fri" + cron: "00 5 * * sat" due_in: "24h"