Radish alpha
r
rad:zwTxygwuz5LDGBq255RA2CbNGrz8
Radicle CI broker
Radicle
Git
test: add scenario that uses all event filters in config file
Lars Wirzenius committed 7 months ago
commit acd3dd068ef2ca0d1f6f69beaf5b82cb99db0a8a
parent eb4d4a3
1 file changed +32 -15
modified ci-broker.md
@@ -74,6 +74,23 @@ adapters:
triggers:
  - adapter: mcadapterface
    filters:
+
      - !Branch "main"
+
~~~
+

+
~~~{#broker-with-all-filter-kinds.yaml .file .yaml}
+
db: ci-broker.db
+
report_dir: reports
+
queue_len_interval: 1min
+
adapters:
+
  mcadapterface:
+
    command: ./adapter.sh
+
    env:
+
      RADICLE_NATIVE_CI: native-ci.yaml
+
    sensitive_env:
+
      API_KEY: xyzzy
+
triggers:
+
  - adapter: mcadapterface
+
    filters:
      - !And
        - !NoneOf
          - !Branch "main"
@@ -84,19 +101,19 @@ triggers:
          - BranchCreated
        - !Not
          - BranchDeleted
-
        - BranchUpdated
-
        - TagCreated
-
        - TagDeleted
-
        - TagUpdated
-
        - Branch
-
        - DefaultBranch
-
        - Deny
-
        - HasFile
-
        - Node
-
        - PatchCreated
-
        - PatchUpdated
-
        - Patch
-
        - Repository
+
        - !BranchUpdated
+
        - !TagCreated
+
        - !TagDeleted
+
        - !TagUpdated
+
        - !Branch "a2dec1a5b3ab5b34cea16c07b632023d9ce535fc"
+
        - !DefaultBranch
+
        - !Deny
+
        - !HasFile "xyzzy"
+
        - !Node "z6MkgEMYod7Hxfy9qCvDv5hYHkZ4ciWmLFgfvm3Wn1b2w2FV"
+
        - !PatchCreated
+
        - !PatchUpdated
+
        - !Patch "a2dec1a5b3ab5b34cea16c07b632023d9ce535fc"
+
        - !Repository "rad:zwTxygwuz5LDGBq255RA2CbNGrz8"
~~~

~~~{#broker-with-concurrent-adapters.yaml .file .yaml}
@@ -418,8 +435,8 @@ output is in the JSON format. It does not try to make sure the JSON
matches the YAML semantically.

~~~scenario
-
given a Radicle node, with CI configured with broker-with-concurrent-adapters.yaml and adapter dummy.sh
-
when I run cib --config broker-with-concurrent-adapters.yaml config --output actual.json
+
given a Radicle node, with CI configured with broker-with-all-filter-kinds.yaml and adapter dummy.sh
+
when I run cib --config broker-with-all-filter-kinds.yaml config --output actual.json
when I run jq . actual.json
then command is successful
~~~