From 7296cab85a44e0547c02b1eb5d77ad6285e74f59 Mon Sep 17 00:00:00 2001 From: Michael Delva Date: Thu, 25 Jun 2026 14:29:49 +0200 Subject: [PATCH 1/3] Updated the rotate_archives function to now use source and destination directories --- src/generator/features/archive.py | 5 ++++- src/generator/templates/archive.mako | 3 ++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/generator/features/archive.py b/src/generator/features/archive.py index 4313c9d..073a24a 100644 --- a/src/generator/features/archive.py +++ b/src/generator/features/archive.py @@ -1,6 +1,8 @@ """Archive feature for the Jenkins File Generator. This feature allows to archive the artifacts or build products created by the jenkins pipeline. It also allows to upload the archives to an S3 bucket. +It requires the python feature to work, and that you have in the requirements of your python folder in the project +a reference to the package GameDevTools. Both actions have the same behavior: 1. The local folder will be copied over to the shared folder / s3 bucket with the current date @@ -41,7 +43,8 @@ class RotateArchivesConfig(BaseModel): default=False, description="Enable or disable the action of rotating the archives", ) - directory_path: Path = Field(description="Path to the directory to rename with the current date") + source_directory: Path = Field(description="Path to the source directory where to move the files from") + destination_directory: Path = Field(description="Path to the destination directory where to move the files to (in a new folder based on the current date") keep_count: int = Field( default=10, description="Number of directories to keep in the parent folder after directory_path has been renamed", diff --git a/src/generator/templates/archive.mako b/src/generator/templates/archive.mako index 32451fc..38e9bea 100644 --- a/src/generator/templates/archive.mako +++ b/src/generator/templates/archive.mako @@ -29,7 +29,8 @@ def archivePackages() { def rotate_archives_output_file_path = "${feature_config.rotate_archives.folder_output_file_name.as_posix()}" stage ( "Rotate Archives" ) { - def properties = """--directory_path="${feature_config.rotate_archives.directory_path.as_posix()}" ` + def properties = """--source_directory="${feature_config.rotate_archives.source_directory.as_posix()}" ` +--destination_directory="${feature_config.rotate_archives.destination_directory.as_posix()}" ` --keep_count="${feature_config.rotate_archives.keep_count}" ` <%text>--folder_output_file_name="${rotate_archives_output_file_path}" """ From 20523fb593bc9899e4ed36beb88ce718e7ea93c6 Mon Sep 17 00:00:00 2001 From: Michael Delva Date: Thu, 25 Jun 2026 14:30:38 +0200 Subject: [PATCH 2/3] Added towncrier entry --- .changelog/40.changed.md | 1 + 1 file changed, 1 insertion(+) create mode 100644 .changelog/40.changed.md diff --git a/.changelog/40.changed.md b/.changelog/40.changed.md new file mode 100644 index 0000000..68d671e --- /dev/null +++ b/.changelog/40.changed.md @@ -0,0 +1 @@ +Updated usage of rotate_archives to use source and destination directories instead of renaming the folder in place From c61b842e2be168031533491f6948c13d7310e59f Mon Sep 17 00:00:00 2001 From: Michael Delva Date: Thu, 25 Jun 2026 14:35:03 +0200 Subject: [PATCH 3/3] Format --- src/generator/features/archive.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/generator/features/archive.py b/src/generator/features/archive.py index 073a24a..f517559 100644 --- a/src/generator/features/archive.py +++ b/src/generator/features/archive.py @@ -44,7 +44,9 @@ class RotateArchivesConfig(BaseModel): description="Enable or disable the action of rotating the archives", ) source_directory: Path = Field(description="Path to the source directory where to move the files from") - destination_directory: Path = Field(description="Path to the destination directory where to move the files to (in a new folder based on the current date") + destination_directory: Path = Field( + description="Path to the destination directory where to move the files to (in a new folder based on the current date" + ) keep_count: int = Field( default=10, description="Number of directories to keep in the parent folder after directory_path has been renamed",