canonical / solutions-engineering-automation

Repo for automating tasks for Solutions Engineering Team.
1 stars 5 forks source link

Simplify job matrix configuration for better readability and maintainability #7

Closed agileshaw closed 3 months ago

agileshaw commented 6 months ago

Right now (#4) in weekly-test job matrix strategy, we are using include to verbosely list all repositories and their parameter (workflow, branch) one by one. This is necessary because we haven't unify the name of their default branches and workflow to call. Once the unifying work is done, I suggest rewrite the matrix configuration the following way so that it is easy to spot: 1) the list of repositories we are running weekly tests for; 2) what the standard parameter combinations are; 2) the few "irregular" test setup.

jobs:
  weekly-tests:
    ...
    strategy:
        max-parallel: 3
        fail-fast: false
        matrix:
          repo: [charm-apt-mirror, charm-apt-mirror, charm-cloudsupport, charm-duplicity, hardware-observer-operator, ...]
          workflow_file_name: [check.yaml]
          branch: [main]
          include:  # only the special ones are listed explicitly
             - repo: hardware-observer-operator
               workflow_file_name: cos_integration.yaml
               branch: master
             - ...