You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to describe matrix both with the combinations AND the list in the include field at the same time.
My main reasons to such selective include along with the combination is to avoid bloat of combinations.
See the example below.
Suggested solution
Suggested solution is, the combinations and include are both used to generate workflows.
Example:
matrix:
TOOLCHAIN:
- stable
- betaPROFILE:
- debug
- releaseFEATURES:
- NONE
- foo
- bar
- foo+barinclude:
- TOOLCHAIN: oldest-supported # Versions before stable, but still supported officially.PROFILE: debugFEATURES: foo+bar # test with all major features enabled at once
- TOOLCHAIN: nightlyPROFILE: debugFEATURES: NONE # No features
- TOOLCHAIN: nightlyPROFILE: debugFEATURES: foo+bar # test with all major features at once
- TOOLCHAIN: nightlyPROFILE: debugFEATURES: foo+bar+experimental-baz # ...and also experimental feature!steps:
# long long steps
In this case, there will be 2×2×4 (=16) workflows to be generated from combinations, and additionally, plus 4 workflows to be generated from include (so total is 20).
Alternative
Write all "resolved" combinations in include manually.
This makes it hard to maintain the variables.
Write combinations without include, and accept extra (unnecessary) workflows.
This may make tests too long. In the above example, simply putting nightly to TOOLCHAIN: will create 8 more workflows, and I need more for TOOLCHAIN: oldest-supported and experimental-baz cases!
This may exceed the limit of combinations (25 or something? In my test environment 27 was the maximum but I don't know why this was not 25...)
Split the workflow YAML file into two, a combinations version and include version.
This forces the maintainer to duplicate all parts other than matrix (such as clone, variables, when, steps, etc.) so makes maintenance error-prone.
Additional context
I'm not familiar with go but this part seems to be responsible:
Clear and concise description of the problem
I want to describe
matrix
both with the combinations AND the list in theinclude
field at the same time.My main reasons to such selective
include
along with the combination is to avoid bloat of combinations.See the example below.
Suggested solution
Suggested solution is, the combinations and
include
are both used to generate workflows.Example:
In this case, there will be 2×2×4 (=16) workflows to be generated from combinations, and additionally, plus 4 workflows to be generated from
include
(so total is 20).Alternative
include
manually.include
, and accept extra (unnecessary) workflows.nightly
toTOOLCHAIN:
will create 8 more workflows, and I need more forTOOLCHAIN: oldest-supported
andexperimental-baz
cases!include
version.matrix
(such asclone
,variables
,when
,steps
, etc.) so makes maintenance error-prone.Additional context
I'm not familiar with go but this part seems to be responsible:
woodpecker/pipeline/frontend/yaml/matrix/matrix.go
Lines 46 to 53 in ef8e033
Parsing both (of course ignoring
include
as a tag) and mergingcalc(matrix)
andaxis
may produce the expected result?BTW, the document should clarify this is not currently supported.
Validations
next
version already [https://woodpecker-ci.org/faq#which-version-of-woodpecker-should-i-use]The text was updated successfully, but these errors were encountered: