Plugins synchronizer

This job synchronize plugins between those stored locally (typically downloaded by the Plugins Downloader job) and the installed plugins.


Use it

Sample job configuration in your scenario file:

  - name: Synchronize plugins
    uses: qplugins-synchronizer
    with:
      action: create_or_restore
      profile_ref: downloaded

Options

action

Tell the job what to do with plugins in installed profiles:

Possible_values:

  • create: add plugins if they are not present

  • create_or_restore: add plugins if not present and replace eventual existing one

  • remove: remove plugins which are not listed

deletion_mode

Deletion policy to apply when it comes to removing files from the end-user disk.

Possible_values: see Deletion policy section in configuration page.

Default: trash_or_delete

profile_ref

Which profile.json file to use as reference.

Possible_values:

  • downloaded: read plugins from the local downloaded (synchronized) profiles before they are copied in to the user QGIS 3 data.

  • installed: read plugins from the installed profiles (folders in user data QGIS3). Useful when using a scenario without the qprofiles-manager job. Be careful: if the end-user edits the profile.json file located directly into the QGIS profile folder to control the plugins synchronization.

Default: ~/.cache/qgis-deployment-toolbelt/plugins

source

Where to find plugins zip files.

Possible_values: a valid path to an existing folder

Default: ~/.cache/qgis-deployment-toolbelt/plugins


How does it work

Workflow

  1. List plugins archives into the source folder. Default: ~/.cache/qgis-deployment-toolbelt/plugins

  2. Parse profiles installed

  3. Compare plugin versions between referenced in profile.json and the one installed

  4. If version plugin in installed profile is inferior, unzip the download plugin in installed profiles. Upgrade process can be controlled per plugin in profile.json using upgrade_mode:

    • keep (default): existing plugin folder is kept, newer version is unpacked on top of it,

    • delete: existing plugin folder is deleted before unpack.

QDT-managed plugins manifest

Added in version 0.44.0

Every plugin installed or upgraded by this job is recorded in a .qdt-managed-plugins.json file, stored directly under the profile’s python/plugins folder (next to the plugin folders themselves). For each plugin, it keeps its version, its plugin ID (when known), the QDT version that deployed it and the installation date.

This manifest lets QDT keep track of which plugins it actually deployed, as opposed to plugins installed manually by the end-user within the same profile (for example, through QGIS’ own Plugin Manager). It’s meant to be internally read by QDT and shouldn’t be edited manually.