markusthoemmes commented on a change in pull request #2383: docker pull invoker 
images runtimes from manifest
URL: 
https://github.com/apache/incubator-openwhisk/pull/2383#discussion_r123009002
 
 

 ##########
 File path: ansible/roles/invoker/tasks/deploy.yml
 ##########
 @@ -3,16 +3,40 @@
 
 - include: docker_login.yml
 
-- name: "pull action images with tag {{docker_image_tag}}"
+- name: "pull invoker images with tag {{docker_image_tag}}"
   shell: "docker pull {{docker_registry}}{{item}}:{{docker_image_tag}}"
   with_items:
     - '{{ docker_image_prefix }}/invoker'
-    - '{{ docker_image_prefix }}/dockerskeleton'
-    - '{{ docker_image_prefix }}/nodejs6action'
-    - '{{ docker_image_prefix }}/python2action'
-    - '{{ docker_image_prefix }}/python3action'
-    - '{{ docker_image_prefix }}/swift3action'
-    - '{{ docker_image_prefix }}/java8action'
+  when: docker_registry != ""
+
+- name: "pull nodejs action images with tag {{docker_image_tag}}"
+  shell: "docker pull 
{{docker_registry}}{{docker_image_prefix}}/{{item.image.name}}:{{docker_image_tag}}"
+  with_items:
+    - "{{ runtimesManifest.runtimes.nodejs }}"
+  when: (docker_registry != "") and ("deprecated" not in item)
+
+- name: "pull python action images with tag {{docker_image_tag}}"
+  shell: "docker pull 
{{docker_registry}}{{docker_image_prefix}}/{{item.image.name}}:{{docker_image_tag}}"
+  with_items:
+    - "{{ runtimesManifest.runtimes.python }}"
+  when: (docker_registry != "") and ("deprecated" not in item)
+
+- name: "pull swift action images with tag {{docker_image_tag}}"
+  shell: "docker pull 
{{docker_registry}}{{docker_image_prefix}}/{{item.image.name}}:{{docker_image_tag}}"
+  with_items:
+    - "{{ runtimesManifest.runtimes.swift }}"
+  when: (docker_registry != "") and ("deprecated" not in item)
+
+- name: "pull java action images with tag {{docker_image_tag}}"
+  shell: "docker pull 
{{docker_registry}}{{docker_image_prefix}}/{{item.image.name}}:{{docker_image_tag}}"
+  with_items:
+    - "{{ runtimesManifest.runtimes.java }}"
+  when: (docker_registry != "") and ("deprecated" not in item)
 
 Review comment:
   I'd rather not define all the runtimes here manually, that's quite a tedious 
process.
   
   Try the following:
   
   ```
   - name: "pull java action images with tag {{docker_image_tag}}"
     shell: "docker pull 
{{docker_registry}}{{docker_image_prefix}}/{{item}}:{{docker_image_tag}}"
     with_items: "{{ runtimesManifest.runtimes.values() | sum(start=[]) | 
map(attribute='image.name') | list }}"
     when: (docker_registry != "")
   ```
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to