Deployment filters
You can indicate filters to include or exclude artifacts in the deployment phase. For each deployment, you can specify both filters or only one of them.
You filter the artifacts that are contained in The package file. Filters are effective only on the building blocks that are related to artifacts.
You include artifacts by entering includes_artifacts
and you exclude artifacts
by entering excludes_artifacts
.
Filters are regular expressions.
- Only the artifacts whose name contains
LGA
are to be deployed. Inincludes_artifacts
, the filter is.*LGA.*
. - All the artifacts with a
DBRM
extension are to be excluded from the deployment. Inexcludes_artifacts
, the filter is.*\.DBRM
.
You can indicate these filters on the deployment command and at the root level or at an artifact type level of the environment variables file. The filters priority is the command line, then the root level of the environment variables file, and finally the artifact type level of the environment variables file.
Filters are effective only on the steps that are run during the deployment. If a step is not run
because of a --tags
or --skipTags
argument in The Wazi Deploy generation command command, filters are ignored.
filtered_artifacts
level is generated inside the
steps
level of The evidence file for traceability
purposes. This level lists the artifacts that were excluded from the deployment because of these
filters and reminds the include and exclude filters. Filters on the deployment command
- Enter a
-e
(extra-vars
) argument in The Python deployment command or The Ansible deployment command, like in the following example.-e '{"includes_artifacts":[".*LGA.*"]}' -e '{"excludes_artifacts": [".*.DBRM"]}'
- Enter the --artifactsFilterFileName deployment option in the Python deployment command. This option
cannot be used for Ansible.Indicate the filters as lists in a YAML file, like in the following example:
includes_artifacts: - .*LGA.* excludes_artifacts: - .*\.DBRM
Enter the path to the YAML file in theartifactsFilterFileName
argument of the Python deployment command like in the following example:wazideploy-deploy\ --deploymentPlan inputs/deployment_plan.yml\ --packageInputFile inputs/package.tar\ --envFile inputs/environment_zos.yml\ -efn outputs/evidence.yaml\ --workingFolder work --artifactsFilterFileName C:/test/filters.yaml
Filters in the environment variables file
You can enter filters in the Ansible or Python environment variables file, at two levels:
- At the root level.
includes_artifacts: - .*LGA.* excludes_artifacts: - .*\.DBRM
- In an artifact type. For example, in the
CICLOAD
type, you can add the following lines in the Ansible environment variables file.- type: 'CICSLOAD' copy_by_folder: '{{default_copy_by_folder}}' includes_artifacts: - .*LGA.* pds: name: '{{ hlq_cics }}.LOADLIB' spec: "{{common_pds_load_spec}}" backup: '{{ hlq_cics }}.BACK.LOADLIB'
You can do the same in the Python environment variables file.- pattern: .*\.CICSLOAD$ dataset: "{{ hlq_cics }}.LOADLIB" dataset_backup: "{{ hlq_cics }}.BACK.LOADLIB" spec: "{{ common_pds_load_spec }}" is_load: True force_lock: True aliases: True cics_systems: - "{{ cics_sys_def }}" use_native_copy : True includes_artifacts: - .*LGA.*