From 035a64b6f0b71c5e8f02e15b98d7f2516256e641 Mon Sep 17 00:00:00 2001 From: Valerij Maljulin Date: Mar 16 2020 13:58:22 +0000 Subject: Documentation update for side-tags Signed-off-by: Valerij Maljulin --- diff --git a/docs/package-specific-policies.rst b/docs/package-specific-policies.rst index b9054bd..f754bb7 100644 --- a/docs/package-specific-policies.rst +++ b/docs/package-specific-policies.rst @@ -225,7 +225,8 @@ $NVR``. Then it parses URL in "source" field to get namespace ("rpms" or "containers" etc.), the git commit and package name (or rather the git repository name). -For HTTP method, the remote rule URL is constructed based on ``HTTP_URL_TEMPLATE`` +For HTTP method, the remote rule URL is constructed based on the URL template specified in Greenwave configuration. The URL template is something like:: http://example.com/{pkg_namespace}{pkg_name}/raw/{rev}/f/gating.yaml + diff --git a/docs/policies.rst b/docs/policies.rst index 79d7b35..f112742 100644 --- a/docs/policies.rst +++ b/docs/policies.rst @@ -278,7 +278,7 @@ Below is an example configuration of remote rule URLs: REMOTE_RULE_POLICIES = { 'brew-build-group': ( 'https://git.example.com/devops/greenwave-policies/side-tags/raw/ - 'master/{pkg_namespace}{pkg_name}.yaml' + 'master/{subject_id}.yaml' ), '*': ( 'https://src.fedoraproject.org/{pkg_namespace}' @@ -286,3 +286,8 @@ Below is an example configuration of remote rule URLs: ) } KOJI_BASE_URL = 'https://koji.fedoraproject.org/kojihub' + +In the URL templates the following parameters can be used: ``{pkg_name}``, ``{pkg_namespace}`` +and ``{rev}``. Values for all of these parameters are being retrieved from Koji. +Parameter ``{subject_id}`` can also be used in URL template. If the subject identifier +contains a hash starting with the ``sha256:`` prefix, this prefix would be removed.