Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-42625

Exclude several combinations from matrix should be possible and documented

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • yaml-axis-plugin
    • None

      Hello,

      I’m not sure if this is missing or just un-documented but I failed to find how to exclude several combinations with yaml-axis-plugin.

      I tried:

      exclude:
       - column: a
         row:
           - b
           - c

      To exclude both (a,b) and (a,c) couples.

      But it does not seem to work.

          [JENKINS-42625] Exclude several combinations from matrix should be possible and documented

          sue445 added a comment -

          Hi.

          If you want to To exclude both (a,b) and (a,c) couples, please write as follows

          exclude:
          - column: a
            row: b
          - column: a
            row: c
          

          sue445 added a comment - Hi. If you want to To exclude both (a,b) and (a,c) couples, please write as follows exclude: - column: a row: b - column: a row: c

          Thanks, it works fine!

          I thought that this could not work because of having the same «key» twice in the list.

          Ideally it should be added to the documentation example.

          Côme Chilliet added a comment - Thanks, it works fine! I thought that this could not work because of having the same «key» twice in the list. Ideally it should be added to the documentation example.

          sue445 added a comment -

          `-` is element of array

          So

          - column: a
            row: b
          

          and

          - column: a
            row: c
          

          are different element in array

          Example (json format)

          {
            "exclude": [
              { "column" : "a", "row" : "b" },
              { "column" : "a", "row" : "c" }
            ]
          }
          

          see https://en.wikipedia.org/wiki/YAML

          sue445 added a comment - `-` is element of array So - column: a row: b and - column: a row: c are different element in array Example (json format) { "exclude" : [ { "column" : "a" , "row" : "b" }, { "column" : "a" , "row" : "c" } ] } see https://en.wikipedia.org/wiki/YAML

            sue445 sue445
            mcmic Côme Chilliet
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: