ef33d00 Add --schema-override to pungi-config-validate script

5 files Authored by jkaluza 4 years ago, Committed by lsedlar 4 years ago,
    Add --schema-override to pungi-config-validate script
    
    Some composes might need extra validation to ensure they are following
    certain strict rules - for example containing only signed packages or
    packages only from particular Koji tag.
    
    There is currently no way how to check that Pungi configuration fulfills
    these extra requirements.
    
    This commit adds new `--schema-override` option to
    `pungi-config-validate` script which allows caller to specify path to
    JSON schema overriding the default JSON schema and therefore limitting
    it further.
    
    For exmaple, to limit the `pkgset_source` to `koji`, one can use
    following JSON schema override:
    
    ```
    {
        "properties": {
            "pkgset_source": {
                "enum": ["koji"]
            }
        }
    }
    ```
    
    It is possible to use `--schema-override` multiple times to apply
    multiple schema overrides.
    
    Merges: https://pagure.io/pungi/pull-request/1341
    Signed-off-by: Jan Kaluza <jkaluza@redhat.com>
    
        
file modified
+21 -2
file modified
+25 -0