Version 3

Support for multiple libraries synchronization (#44, #43, #41)
Support for Docker Secrets (#25)
Support for Seafile client's version through Docker tags (#9)
Mock Seafile server for testings (#6)
Revised project layout and workflow (#38, #39)
Working Docker Hub description publishing (#10)
This commit is contained in:
flow.gunso
2024-03-16 21:58:04 +00:00
parent 4c347b9156
commit f25b0182d2
42 changed files with 1196 additions and 788 deletions
+81 -15
View File
@@ -24,26 +24,92 @@ One great way to help is simply to say thanks. You can do that by [adding a star
# Project workflow
The ins and outs of the project, from setting up a local environment for developments to notifying users of changes.
To provide the different Seafile's client versions, the project rely on the [`seafile` package available throughout the different Debian versions][packages]. Check out [Debian Developer's Package Overview][ddpo] and [Debian Package Tracker][tracker] for in depth details regarding that package.
[packages]: https://packages.debian.org/search?keywords=seafile-cli
[ddpo]: https://qa.debian.org/developer.php?login=team%2Bseafile%40tracker.debian.org
[tracker]: https://tracker.debian.org/pkg/seafile
The following state diagram describe essentially the project workflow for a release.
```mermaid
stateDiagram-v2
feature: Checkout new branch from main
changes: Apply changes
mr: Create a Merge Request
pipelines: CI/CD pipelines must be successful
log: Changes must be documented
merge: Branch is squash merged into main
release: Release is created
[*] --> feature
feature --> changes
changes --> mr
mr --> pipelines
pipelines --> log
log --> merge
merge --> release
release --> [*]
```
## Environment
The following is required to develop:
* Docker engine
* Bash
* Make
## Development
## Management
A few utilities Bash scripts are available to operate the project:
* [build.sh](.utilities/build.sh): build the Docker image and save as a tarball
* [check.sh](.utilities/check.sh): validate CI pipelines
* [package_update_notifier.sh](.utilities/package_update_notifier.sh): notify, through a GitLab issue, if a new `seaf-cli` version is available
* [publish.sh](.utilities/publish.sh): tag and push the image to Docker Hub
* [test.sh](.utilities/test.sh): run the test suite
* [update-docker-hub-full-description.sh](.utilities/update-docker-hub-full-description.sh): push the README.md to the Docker Hub
* [utilities.sh](.utilities/utilities.sh): functions and assets
The project managemenet is mostly run through the Makefile.
Following a trunk-based development strategy, all changes must come from a short lived branch and fast-forward merged into master.
All commits must be squashed into a single commit referencing a specific issue.
The parameter `TARGET` define on which Debian version the instructions are run.
## CI/CD
Tests are run only on merge requests, but they can be run on demand in a local environment.
The [CHANGELOG.md](CHANGELOG.md) and [AUTHORS.md](AUTHORS.md) will be updated on every merge.
Only merge resquests associated with a milestone will end up in a new release. The [README.md](README.md) will be updated then. Description pages for Docker Hub and Seafile's forum will be templated then as well and made available as artifacts for a manual update since #10 and #17 are still opened issues.
The following instructions are available:
### mock
Start the Docker Compose mock for a Seafile server.
### unmock
Start the Docker Compose mock for a Seafile server.
### client
Purge and start the client service on the Docker Compose mock for a Seafile server.
### logs
Continuously display the logs from the client service on the Docker Compose mock for a Seafile server.
### build
Build the Seafile Docker client image depending on the `TARGET`.
### build-test
Build the Seafile Docker client test image depending on the `TARGET`.
### test
Run the Seafile Docker client test container.
### documents
Build the documentation for both Docker Hub and Seafile's forum.
### publish-images
Publish the Docker Seafile client image, properly tagged with the appropriate Seafile cliens versions.
### publish-documents
Publish the generated documentation on Docker Hub only
### save
Export the Seafile Docker client image as a tarball.
### load
Load the Seafile Docker client image from a tarball
## Pipelines
Pipelines are run either on merge requests or on commit tags.
The pipelines are divided into three stages:
* Build
* Test
* Release
Release jobs are obviously not run on merge requests.