diff --git a/examples/docker/src/aem/default/etc/aem.yml b/examples/docker/src/aem/default/etc/aem.yml index 7e352d34..64cfeb53 100755 --- a/examples/docker/src/aem/default/etc/aem.yml +++ b/examples/docker/src/aem/default/etc/aem.yml @@ -138,6 +138,7 @@ instance: package: # Force re-uploading/installing of snapshot AEM packages (just built / unreleased) snapshot_patterns: [ "**/*-SNAPSHOT.zip" ] + snapshot_ignored: false # Use checksums to avoid re-deployments when snapshot AEM packages are unchanged snapshot_deploy_skipping: true # Disable following workflow launchers for a package deployment time only diff --git a/pkg/cfg/defaults.go b/pkg/cfg/defaults.go index 620eb11c..520e9c38 100644 --- a/pkg/cfg/defaults.go +++ b/pkg/cfg/defaults.go @@ -92,7 +92,9 @@ func (c *Config) setDefaults() { v.SetDefault("instance.package.install_html.console", false) v.SetDefault("instance.package.snapshot_deploy_skipping", true) + v.SetDefault("instance.package.snapshot_ignored", false) v.SetDefault("instance.package.snapshot_patterns", []string{"**/*-SNAPSHOT.zip"}) + v.SetDefault("instance.package.toggled_workflows", []string{}) v.SetDefault("instance.repo.property_change_ignored", []string{"jcr:created", "cq:lastModified", "transportPassword"}) diff --git a/pkg/package_manager.go b/pkg/package_manager.go index 1e60d363..9ab11875 100644 --- a/pkg/package_manager.go +++ b/pkg/package_manager.go @@ -28,12 +28,13 @@ import ( type PackageManager struct { instance *Instance - SnapshotDeploySkipping bool UploadOptimized bool InstallRecursive bool InstallHTMLEnabled bool InstallHTMLConsole bool InstallHTMLStrict bool + SnapshotDeploySkipping bool + SnapshotIgnored bool SnapshotPatterns []string ToggledWorkflows []string } @@ -44,12 +45,13 @@ func NewPackageManager(res *Instance) *PackageManager { return &PackageManager{ instance: res, - SnapshotDeploySkipping: cv.GetBool("instance.package.snapshot_deploy_skipping"), UploadOptimized: cv.GetBool("instance.package.upload_optimized"), InstallHTMLEnabled: cv.GetBool("instance.package.install_html.enabled"), InstallHTMLConsole: cv.GetBool("instance.package.install_html.console"), InstallHTMLStrict: cv.GetBool("instance.package.install_html.strict"), InstallRecursive: cv.GetBool("instance.package.install_recursive"), + SnapshotDeploySkipping: cv.GetBool("instance.package.snapshot_deploy_skipping"), + SnapshotIgnored: cv.GetBool("instance.package.snapshot_ignored"), SnapshotPatterns: cv.GetStringSlice("instance.package.snapshot_patterns"), ToggledWorkflows: cv.GetStringSlice("instance.package.toggled_workflows"), } @@ -136,7 +138,7 @@ func (pm *PackageManager) findInternal(pid string) (*pkg.ListItem, error) { } func (pm *PackageManager) IsSnapshot(localPath string) bool { - return stringsx.MatchSome(pathx.Normalize(localPath), pm.SnapshotPatterns) + return !pm.SnapshotIgnored && stringsx.MatchSome(pathx.Normalize(localPath), pm.SnapshotPatterns) } func copyPackageDefaultFiles(targetTmpDir string, data map[string]any) error { diff --git a/pkg/project/app_classic/aem/default/etc/aem.yml b/pkg/project/app_classic/aem/default/etc/aem.yml index 4f52e05e..dd5bfb69 100755 --- a/pkg/project/app_classic/aem/default/etc/aem.yml +++ b/pkg/project/app_classic/aem/default/etc/aem.yml @@ -138,6 +138,7 @@ instance: package: # Force re-uploading/installing of snapshot AEM packages (just built / unreleased) snapshot_patterns: [ "**/*-SNAPSHOT.zip" ] + snapshot_ignored: false # Use checksums to avoid re-deployments when snapshot AEM packages are unchanged snapshot_deploy_skipping: true # Disable following workflow launchers for a package deployment time only diff --git a/pkg/project/app_cloud/aem/default/etc/aem.yml b/pkg/project/app_cloud/aem/default/etc/aem.yml index 29b497b5..0d4697d1 100755 --- a/pkg/project/app_cloud/aem/default/etc/aem.yml +++ b/pkg/project/app_cloud/aem/default/etc/aem.yml @@ -137,6 +137,7 @@ instance: package: # Force re-uploading/installing of snapshot AEM packages (just built / unreleased) snapshot_patterns: [ "**/*-SNAPSHOT.zip" ] + snapshot_ignored: false # Use checksums to avoid re-deployments when snapshot AEM packages are unchanged snapshot_deploy_skipping: true # Disable following workflow launchers for a package deployment time only diff --git a/pkg/project/instance/aem/default/etc/aem.yml b/pkg/project/instance/aem/default/etc/aem.yml index b429ff25..a0dbc163 100755 --- a/pkg/project/instance/aem/default/etc/aem.yml +++ b/pkg/project/instance/aem/default/etc/aem.yml @@ -138,6 +138,7 @@ instance: package: # Force re-uploading/installing of snapshot AEM packages (just built / unreleased) snapshot_patterns: [ "**/*-SNAPSHOT.zip" ] + snapshot_ignored: false # Use checksums to avoid re-deployments when snapshot AEM packages are unchanged snapshot_deploy_skipping: true # Disable following workflow launchers for a package deployment time only