Signed-off-by: Filip Kobierski <fkobi@fsfe.org>
At FSFE, each staff member used to send weekly timelog reports to a council via email. This instance has been created to automate this process.
Automation Steps
The process consists of several steps:
-
A dedicated account on our Nextcloud is created, that has access to the
timelog.txtfiles of all staff members. -
This account is mounted in a Docker container with help of davfs2.
-
In the Docker build process,
report.shfile is copied into the container. Additionally, gtimelog-utils is cloned so thatweekly.pycan be used. See theDockerfile. -
Drone builds the container through
Docker-Composeusing the Drone Secrets. -
Every Monday at 02:00,
report.shis executed, applyingweekly.pyto alltimelog.txtfiles and generating the report from two weeks ago for each staff member. The cron job is set in drone settings.
Run Localy
Docker-compose wants to have the following environment variables:
NEXTCLOUD_URL
NEXTCLOUD_USERNAME
NEXTCLOUD_PASSWORD
You can either store the values in Drone Secrets or create an .env file for this purpose.