Skip to content

Commit

Permalink
Add antsibull_preserve_deps option for the release role.
Browse files Browse the repository at this point in the history
  • Loading branch information
felixfontein committed Apr 27, 2024
1 parent eca780e commit 6e689f3
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 1 deletion.
3 changes: 2 additions & 1 deletion changelogs/fragments/599-prepare-preserve.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@ minor_changes:
- "Add option ``--preserve-deps`` to the ``prepare`` subcommand that allows to preserve the
dependencies if a ``.deps`` file for that version already exists. The versions from that
``.deps`` file are validated against the build requirements and constraints, and the
remainder of the release preparation process remains unchanged
remainder of the release preparation process remains unchanged. The release role allows
to pass this flag when ``antsibull_preserve_deps=true``
(https://github.com/ansible-community/antsibull/pull/599)."
3 changes: 3 additions & 0 deletions roles/build-release/defaults/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ antsibull_ansible_venv: "{{ antsibull_sdist_dir }}/venv"
# Whether or not to start from scratch with a new venv if one exists
antsibull_venv_cleanup: true

# Whether to preserve existing .deps files during the prepare step
antsibull_preserve_deps: false


#####
# These variables relate to verifying that collections properly tag their
Expand Down
8 changes: 8 additions & 0 deletions roles/build-release/meta/argument_specs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -126,3 +126,11 @@ argument_specs:
- Defaults to 0 (all available CPUs)
type: int
default: 0

antsibull_preserve_deps:
description:
- If set to V(true), will preserve existing C(.deps) files during the preparation
process and validate their contents against the build requirements and constraints.
type: bool
default: false
version_added: 0.62.0
1 change: 1 addition & 0 deletions roles/build-release/tasks/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
--data-dir {{ antsibull_data_dir }}
{{ _feature_freeze | default('') }}
{{ '--tags-file' if antsibull_tags_validate else '' }}
{{ '--preserve-deps' if antsibull_preserve_deps else '' }}
# Minimal failure tolerance to galaxy collection download errors
retries: 3
delay: 5
Expand Down

0 comments on commit 6e689f3

Please sign in to comment.