From ed0c36250c53ec3905a6c84ce50d7ff288938bc5 Mon Sep 17 00:00:00 2001 From: "James E. Blair" Date: Mon, 29 Jul 2019 09:05:20 -0700 Subject: [PATCH] Remove download_artifact_name parameter This parameter was deprecated. Now it should be removed so that the name field can be freed up to be a human-readable name. Change-Id: I0ace733e037ebeffcaf516332e7c5b48b3c7a1a3 --- roles/download-artifact/README.rst | 7 ------- roles/download-artifact/tasks/main.yaml | 14 +------------- 2 files changed, 1 insertion(+), 20 deletions(-) diff --git a/roles/download-artifact/README.rst b/roles/download-artifact/README.rst index a87098029..21b19cf8a 100644 --- a/roles/download-artifact/README.rst +++ b/roles/download-artifact/README.rst @@ -18,13 +18,6 @@ many artifacts as match the selection criteria. The job of the previous build. -.. zuul:rolevar:: download_artifact_name - - .. warning:: This field is deprecated and will be removed. Use - ``download_artifact_type`` instead. - - The artifact name. This can be a string or a list of strings. - .. zuul:rolevar:: download_artifact_type The artifact type. This is the value of the ``type`` field in the diff --git a/roles/download-artifact/tasks/main.yaml b/roles/download-artifact/tasks/main.yaml index ea2280d19..21c2ee8ce 100644 --- a/roles/download-artifact/tasks/main.yaml +++ b/roles/download-artifact/tasks/main.yaml @@ -5,16 +5,6 @@ - name: Parse build response set_fact: build: "{{ build.json[0] }}" -- name: Download archive by name - uri: - url: "{{ artifact.url }}" - dest: "{{ download_artifact_directory }}" - loop: "{{ build.artifacts }}" - loop_control: - loop_var: artifact - when: - - "download_artifact_name is defined" - - "artifact.name == download_artifact_name or ((download_artifact_name | type_debug) == 'list' and artifact.name in download_artifact_name)" - name: Download archive by type uri: url: "{{ artifact.url }}" @@ -22,6 +12,4 @@ loop: "{{ build.artifacts }}" loop_control: loop_var: artifact - when: - - "download_artifact_type is defined" - - "'metadata' in artifact and 'type' in artifact.metadata and (artifact.metadata.type == download_artifact_type or ((download_artifact_type | type_debug) == 'list' and artifact.metadata.type in download_artifact_type))" + when: "'metadata' in artifact and 'type' in artifact.metadata and (artifact.metadata.type == download_artifact_type or ((download_artifact_type | type_debug) == 'list' and artifact.metadata.type in download_artifact_type))"