Skip to content

Commit b9d3a8b

Browse files
Otijomflegasteloistrashercedric-anne
authored
feat(content): add publish plugin on marketplace (#173)
* feat(content): add publish plugin on marketplace * fix(content): update prepared statements * fix(content): plugins catalog * Update source/plugins/tutorial.rst Co-authored-by: Johan Cwiklinski <trasher@x-tnd.be> * fix(content): add title * Update source/plugins/tutorial.rst Co-authored-by: Cédric Anne <cedric.anne@gmail.com> * Update source/plugins/tutorial.rst Co-authored-by: Cédric Anne <cedric.anne@gmail.com> * Update source/plugins/tutorial.rst Co-authored-by: Cédric Anne <cedric.anne@gmail.com> * Update source/plugins/tutorial.rst Co-authored-by: Cédric Anne <cedric.anne@gmail.com> --------- Co-authored-by: François Legastelois <flegastelois@users.noreply.github.com> Co-authored-by: Johan Cwiklinski <trasher@x-tnd.be> Co-authored-by: Cédric Anne <cedric.anne@gmail.com>
1 parent 901caa5 commit b9d3a8b

1 file changed

Lines changed: 93 additions & 0 deletions

File tree

‎source/plugins/tutorial.rst‎

Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2368,6 +2368,9 @@ No need to manage uninstallation (`unregister`) as GLPI will handle that itself
23682368
Publishing your plugin
23692369
----------------------
23702370

2371+
Catalog
2372+
^^^^^^^
2373+
23712374
When you consider your plugin is ready and covers a real need, you can submit it to the community.
23722375

23732376
The `plugins catalog <http://plugins.glpi-project.org/>`_ allows GLPI users to discover, download and follow plugins provided by the community as well as first-party plugins provided by Teclib'.
@@ -2447,6 +2450,96 @@ Finally, submit your XML file on the `dedicated page <http://plugins.glpi-projec
24472450

24482451
Teclib' will receive a notification for this submission and after some checks, will activate the publication on the catalog.
24492452

2453+
2454+
Marketplace
2455+
^^^^^^^^^^^
2456+
2457+
By following these steps and recommendations, you will be able to make your plugin available on the GLPI Marketplace, thus offering users simplified installation and updates. We would like to thank you for this contribution, which helps enrich the GLPI ecosystem for the entire community.
2458+
2459+
1. **Preparation**:
2460+
2461+
a. Your plugin archive should contain a directory with a name corresponding to the plugin's technical name. All your plugin's files should be placed in this directory.
2462+
2463+
Example:
2464+
2465+
for a plugin whose ``plugin_init_`` function is ``plugin_init_oauthimap`` in ``setup.php``, the technical name of its directory must be ``oauthimap``.
2466+
The plugin's files should be located inside a directory named ``oauthimap``.
2467+
2468+
b. Make sure your XML file contains a ``<key>`` element that exactly matches this directory name (no spaces, no accents, no uppercase letters).
2469+
2470+
Example: ``<key>oauthimap</key>``
2471+
2472+
c. In the ``<versions>`` section of your XML file, for each version of your plugin (with version number and compatibility),
2473+
add a ``download_url`` tag containing the URL where the plugin archive can be downloaded.
2474+
2475+
Example:
2476+
2477+
::
2478+
2479+
<versions>
2480+
<version>
2481+
<num>1.0</num>
2482+
<compatibility>~10.0.0</compatibility>
2483+
<download_url>https://link/to/your/plugin/file-1.0.tar.gz</download_url>
2484+
</version>
2485+
</versions>
2486+
2487+
2488+
d. In the ``<versions>`` section of your XML file, for each version of your plugin the ``compatibility`` tag value
2489+
must correspond to a GLPI version constraint in a format compatible with the `composer API <https://getcomposer.org/doc/articles/versions.md#writing-version-constraints>`_.
2490+
2491+
Example: ``<compatibility>~10.0.7</compatibility>``
2492+
2493+
1. **Public Access**:
2494+
2495+
- Make sure the URL of the XML file and the plugin archive download URL are publicly accessible.
2496+
- Ensure that the plugin archive is properly structured and downloadable using the URL provided in the XML file.
2497+
2498+
Technical Requirements and Recommendations
2499+
******************************************
2500+
2501+
1. **Compliance with Coding Standards**:
2502+
2503+
- Follow the recommendations in the GLPI Developer Documentation: `GLPI Developer Documentation <https://glpi-developer-documentation.readthedocs.io/>`_
2504+
- Ensure your code complies with GLPI coding standards and does not trigger errors from tools like phpcs.
2505+
2506+
2. **Code Security and Quality**:
2507+
2508+
- Avoid raw SQL queries. Always use GLPI framework methods (see :doc:`Querying <../devapi/database/dbiterator>` and :doc:`Updating <..//devapi/database/dbupdate>`) — **this is mandatory starting from GLPI 11**.
2509+
- Use Twig for templating.
2510+
- Properly enforce permissions in all front-end (front/*) and AJAX (ajax/*) files — **this is mandatory**.
2511+
- The plugin may be rejected if it contains backdoors or obvious security flaws.
2512+
2513+
3. **Compatibility and Updates**:
2514+
2515+
- Make sure your plugin is compatible with a maintained version of GLPI.
2516+
- Keep your plugin up to date to ensure continued compatibility with future GLPI versions.
2517+
2518+
2519+
Submission Process
2520+
******************
2521+
2522+
.. note:: Before continuing, your plugin must be published on the `plugins catalog <http://plugins.glpi-project.org/>`_, see above.
2523+
2524+
1. **Validation and Approval**:
2525+
2526+
- By default, plugins accepted on the Plugins Website are not automatically available on the Marketplace. For security and relevance reasons, the GLPI team must review key technical aspects before approving Marketplace availability.
2527+
- If your plugin is already listed on the Plugins Website and you want to distribute it on the Marketplace, please send an email to the GLPI team at glpi@teclib.com.
2528+
- Depending on the results of the review, the team may approve the plugin for availability on the on-premise GLPI Marketplace, and/or the Cloud instance Marketplace (which has stricter security requirements).
2529+
2530+
2. **Lifecycle and Maintenance**
2531+
2532+
- Ongoing Monitoring:
2533+
2534+
- After approval and publication, regularly monitor your plugin’s performance and security to ensure continued compliance with GLPI requirements.
2535+
2536+
- Plugin Deactivation:
2537+
2538+
- The GLPI team reserves the right to deactivate the plugin from the Marketplace if, at any point, it no longer meets requirements, causes a major bug, or presents a critical security vulnerability.
2539+
2540+
Therefore, it is crucial to maintain your plugin and promptly address any reported issues.
2541+
2542+
24502543
Miscellaneous
24512544
-------------
24522545

0 commit comments

Comments
 (0)