Browse Source

Allow extra data in artifact schema validation

The schema validator for zuul.artifacts returned via zuul_return
did not allow for extra return data (outside of the zuul hierarchy).

Correct the validator to allow that, and update the test to exercise
it.

Change-Id: Ia8d7ed212b03d978bec1a7de1a2647b0c87b7cf9
changes/38/638038/1
James E. Blair 2 years ago
parent
commit
5271b592af
2 changed files with 4 additions and 1 deletions
  1. +2
    -0
      tests/fixtures/config/sql-driver/git/common-config/playbooks/project-test1.yaml
  2. +2
    -1
      zuul/lib/artifacts.py

+ 2
- 0
tests/fixtures/config/sql-driver/git/common-config/playbooks/project-test1.yaml View File

@ -3,6 +3,8 @@
- name: Return artifact data
zuul_return:
data:
something_else:
foo: bar
zuul:
artifacts:
- name: relative


+ 2
- 1
zuul/lib/artifacts.py View File

@ -26,7 +26,8 @@ zuul_data = {
'log_url': str,
'artifacts': [artifact],
v.Extra: object,
}
},
v.Extra: object,
}
artifact_schema = v.Schema(zuul_data)


Loading…
Cancel
Save