mirror of
https://github.com/mattermost/mattermost.git
synced 2026-04-15 22:12:19 -04:00
We discovered that cancel-in-progress only controls in-progress jobs. Which means that pending jobs will _always_ be cancelled regardless. There is an open discussion: https://github.com/orgs/community/discussions/5435 which was closed saying this is how the feature is designed. We try to work around this by refactoring into separate reusable workflows and having concurrency only for PR workflows. ```release-note NONE ``` Co-authored-by: Mattermost Build <build@mattermost.com>
29 lines
1.1 KiB
Markdown
29 lines
1.1 KiB
Markdown
### Background
|
|
|
|
This document aims to explain the bunch of server and webapp yaml files and their functionality.
|
|
|
|
The context behind this complexity is that we want new pushes to PR branches to cancel older in-progress and pending CI runs, _but_ we don't want that to happen in master branch. Unfortunately, there is no config knob to control pending workflows and if you set a concurrency group, then pending workflows will _always_ be canceled. Refer to https://github.com/orgs/community/discussions/5435 for discussion.
|
|
|
|
Therefore, we have a template yaml file which is actually the main CI code. That is then imported by `{server|webapp}-ci-master.yml` and `{server|webapp}-ci-pr.yml`. The `-master.yml` files don't have any concurrency limits, but `-pr.yml` files do.
|
|
|
|
### Folder structure
|
|
|
|
server-ci-pr
|
|
|
|
|
---server-ci-template
|
|
|
|
|
---server-test-template (common code for postgres and mysql tests)
|
|
|
|
server-ci-master
|
|
|
|
|
---server-ci-template
|
|
|
|
|
---server-test-template (common code for postgres and mysql tests)
|
|
|
|
webapp-ci-pr
|
|
|
|
|
---webapp-ci-template
|
|
|
|
webapp-ci-master
|
|
|
|
|
---webapp-ci-template
|