trigger\_project\_update ======================== This script is called as a file-hook by GitLab upon events. It handles the event is is given. If appropriate for the event, the repository's metadata is validated, the user who caused the event gets notified by email about errors in case there are any, and the metadata index is updated. .. note:: Users cannot disable the health check email. Metadata validation ------------------- Metadata files must adhere to the following schema. There are additional restrictions for collections. Should a metadata file indicate a collection, it must declare the collectionContent, which must be valid metadata files in subdirectories of the metadata file declaring the collection. Collections may be nested. .. literalinclude:: ../../filehooks/schemas/gitlab_metadata.schema.json :language: JSON Indexing -------- For the indexing, the alias ``metadata`` is used. The metadata files are indexed in the ``metadata`` alias using the schema: .. literalinclude:: ../../filehooks/schemas/es_metadata.schema.json :language: JSON In the GitLab docker container, one can check the current content of the alias ``metadata`` by issuing the following command. .. code-block:: bash curl -GET http://sharing_elasticsearch:9200/metadata/_search Logging ------- Logging information can be found at: - General logging information is provided at ``/var/log/gitlab/gitlab-rails/trigger_project_update.log`` - If an error which does not get handled occurs during execution of the file hook, the error message is logged to ``/var/log/gitlab/gitlab-rails/plugin.log``. Such errors indicate a problem which should be investigated. trigger\_project\_update module ------------------------ .. automodule:: scripts.trigger_project_update :members: :undoc-members: :show-inheritance: