Cleanup manager¶
This job removes stale resources left by previous deployments.
Use it¶
Sample job configuration in your scenario file:
- name: Cleanup stale resources
uses: cleanup-manager
with:
deletion_policy: trash_or_delete
dry_run: true
scopes:
- plugins_cache
- plugins_installed
- profiles_deprecated
- profiles_incompatible_qgis
- shortcuts_orphans_manifest
- shortcuts_orphans_mark
Options¶
deletion_policy¶
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
dry_run¶
If true, no file or folder is deleted. QDT only reports what would be removed.
Default: false
scopes¶
Scope(s) of the cleanup.
Possible values:
plugins_cache: remove ZIP archives from the local QDT plugins cache that are no longer referenced by profiles.plugins_installed: remove stale plugin folders from installed profiles.profiles_deprecated: remove installed profiles flagged asdeprecatedin the downloaded repositories (see the profile reference). It’s recommended to run this job after the profiles downloader. A profile still provided as active by another repository is kept.profiles_incompatible_qgis: remove installed profiles whoseqgisMinimumVersionorqgisMaximumVersion, as declared in the downloaded repositories, exclude the targeted QGIS version (QDT_QGIS_VERSION). Nothing is removed if the targeted QGIS version is unknown.shortcuts_orphans_manifest: remove shortcuts listed in the QDT managed shortcuts manifest pointing to a profile which is not installed anymore from a QDT point of view.shortcuts_orphans_mark: remove shortcuts created by the shortcuts manager, found in the user desktop and start menu folders and containing the QDT “mark”, whose profile folder does not exist anymore.
Note
When plugins_installed is used, QDT only targets plugins listed in the profile manifest named .qdt-managed-plugins.json, generated by the Plugins Synchronizer job.
This means plugins installed manually by users (for example via the QGIS Plugin Manager) are ignored by this cleanup.
Tip
The two shortcuts_orphans_* scopes are complementary and can be used together:
shortcuts_orphans_manifestonly targets shortcuts recorded by the shortcuts manager, wherever they are. It’s the most reliable, since the manifest is written by QDT, and the strictest: a shortcut is removed as soon as its profile is not installed by QDT anymore (noprofile.json).shortcuts_orphans_marklooks for shortcuts in the user desktop and start menu folders, recognized by the QDT mark in their description. It covers shortcuts missing from the manifest (created by QDT before the manifest existed, or manifest removed), but is more conservative: a shortcut is only removed if its profile folder does not exist at all, since it may target a profile managed by other means.
Default:
plugins_cache