You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openwhisk.apache.org by ma...@apache.org on 2017/06/27 16:28:23 UTC

[incubator-openwhisk] branch master updated: docker pull invoker images runtimes from manifest (#2383)

This is an automated email from the ASF dual-hosted git repository.

markusthoemmes pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-openwhisk.git


The following commit(s) were added to refs/heads/master by this push:
     new 32e31b5  docker pull invoker images runtimes from manifest (#2383)
32e31b5 is described below

commit 32e31b599280c66aeb79f4ad2523eead529f9e81
Author: Carlos Santana <cs...@gmail.com>
AuthorDate: Tue Jun 27 12:28:21 2017 -0400

    docker pull invoker images runtimes from manifest (#2383)
---
 ansible/group_vars/all                             | 13 +++++++++---
 ansible/roles/invoker/tasks/deploy.yml             | 24 ++++++++++++++--------
 .../scala/whisk/core/entity/test/ExecHelpers.scala |  4 ++--
 3 files changed, 27 insertions(+), 14 deletions(-)

diff --git a/ansible/group_vars/all b/ansible/group_vars/all
index 344462b..ce0a98d 100644
--- a/ansible/group_vars/all
+++ b/ansible/group_vars/all
@@ -42,17 +42,21 @@ runtimesManifest:
       default: true
       image:
         name: "nodejs6action"
+      deprecated: false
     python:
     - kind: "python"
       image:
         name: "python2action"
+      deprecated: false
     - kind: "python:2"
       default: true
       image:
         name: "python2action"
+      deprecated: false
     - kind: "python:3"
       image:
         name: "python3action"
+      deprecated: false
     swift:
     - kind: "swift"
       image:
@@ -62,19 +66,22 @@ runtimesManifest:
       default: true
       image:
         name: "swift3action"
+      deprecated: false
     - kind: "swift:3.1.1"
       image:
         name: "action-swift-v3.1.1"
+      deprecated: false
     java:
     - kind: "java"
+      default: true
+      image:
+        name: "java8action"
+      deprecated: false
       attached:
         attachmentName: "jarfile"
         attachmentType: "application/java-archive"
       sentinelledLogs: false
       requireMain: true
-      image:
-        name: "java8action"
-      default: true
   blackboxes:
     - name: "dockerskeleton"
 
diff --git a/ansible/roles/invoker/tasks/deploy.yml b/ansible/roles/invoker/tasks/deploy.yml
index 090de13..157f0ad 100644
--- a/ansible/roles/invoker/tasks/deploy.yml
+++ b/ansible/roles/invoker/tasks/deploy.yml
@@ -3,17 +3,23 @@
 
 - include: docker_login.yml
 
-- name: "pull action images with tag {{ docker_image_tag }}"
-  shell: "docker pull {{ docker_registry }}{{ item }}:{{ docker_image_tag }}"
+- name: "pull invoker image 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 }}/action-swift-v3.1.1'
-    - '{{ docker_image_prefix }}/java8action'
+  when: docker_registry != ""
+  retries: 3
+
+- name: "pull runtime 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=[]) | selectattr('deprecated', 'equalto',false)  | map(attribute='image.name') | list | unique }}"
+  when: docker_registry != ""
+  retries: 3
+
+- name: "pull blackboxes action images with tag {{docker_image_tag}}"
+  shell: "docker pull {{docker_registry}}{{docker_image_prefix}}/{{item.name}}:{{docker_image_tag}}"
+  with_items:
+    - "{{ runtimesManifest.blackboxes }}"
   when: docker_registry != ""
   retries: 3
 
diff --git a/tests/src/test/scala/whisk/core/entity/test/ExecHelpers.scala b/tests/src/test/scala/whisk/core/entity/test/ExecHelpers.scala
index f3adfc5..0443544 100644
--- a/tests/src/test/scala/whisk/core/entity/test/ExecHelpers.scala
+++ b/tests/src/test/scala/whisk/core/entity/test/ExecHelpers.scala
@@ -48,7 +48,7 @@ trait ExecHelpers
     }
 
     protected def js6(code: String, main: Option[String] = None): Exec = {
-        CodeExecAsString(RuntimeManifest(NODEJS6, imagename(NODEJS6), default = Some(true)), trim(code), main.map(_.trim))
+        CodeExecAsString(RuntimeManifest(NODEJS6, imagename(NODEJS6), default = Some(true), deprecated = Some(false)), trim(code), main.map(_.trim))
     }
 
     protected def jsDefault(code: String, main: Option[String] = None) = {
@@ -60,7 +60,7 @@ trait ExecHelpers
     }
 
     protected def swift3(code: String, main: Option[String] = None): Exec = {
-        CodeExecAsString(RuntimeManifest(SWIFT3, imagename(SWIFT3), default = Some(true)), trim(code), main.map(_.trim))
+        CodeExecAsString(RuntimeManifest(SWIFT3, imagename(SWIFT3), default = Some(true), deprecated = Some(false)),  trim(code), main.map(_.trim))
     }
 
     protected def sequence(components: Vector[FullyQualifiedEntityName]): Exec = SequenceExec(components)

-- 
To stop receiving notification emails like this one, please contact
['"commits@openwhisk.apache.org" <co...@openwhisk.apache.org>'].