markusthoemmes commented on a change in pull request #2583: Create Nginx image 
with localy built CLI, Blackbox SDK.
URL: 
https://github.com/apache/incubator-openwhisk/pull/2583#discussion_r137454299
 
 

 ##########
 File path: core/nginx/build.gradle
 ##########
 @@ -0,0 +1,72 @@
+// make sure that CLI builds each OS variation
+def cliProject = findProject(':tools:cli')
+configure(cliProject) {
+  ext.set("crossCompileCLI", "true")
+}
+
+// Because of how Dockerfiles only know about files in the current
+// direcotry or sub directories, we need to copy the previously built
+// CLI images to this directory.
+task copyCLI(dependsOn: ':tools:cli:copyCLIShortcut') {
+  doLast {
+    // executables
+    copy {
+      from "${projectDir}/../../bin/linux/386/wsk"
+      into "${projectDir}/build/linux/386/"
+    }
+    copy {
+      from "${projectDir}/../../bin/linux/amd64/wsk"
+      into "${projectDir}/build/linux/amd64/"
+    }
+    copy {
+      from "${projectDir}/../../bin/mac/386/wsk"
+      into "${projectDir}/build/mac/386/"
+    }
+    copy {
+      from "${projectDir}/../../bin/mac/amd64/wsk"
+      into "${projectDir}/build/mac/amd64/"
+    }
+    copy {
+      from "${projectDir}/../../bin/windows/386/wsk.exe"
+      into "${projectDir}/build/windows/386/"
+    }
+    copy {
+      from "${projectDir}/../../bin/windows/amd64/wsk.exe"
+      into "${projectDir}/build/windows/amd64/"
+    }
+
+    // zip files
+    copy {
+      from "${projectDir}/../../bin/linux/386/OpenWhisk_CLI-linux-32bit.tgz"
+      into "${projectDir}/build/linux/386/"
+    }
+    copy {
+      from "${projectDir}/../../bin/linux/amd64/OpenWhisk_CLI-linux.tgz"
+      into "${projectDir}/build/linux/amd64/"
+    }
+    copy {
+      from "${projectDir}/../../bin/mac/386/OpenWhisk_CLI-mac-32bit.zip"
+      into "${projectDir}/build/mac/386/"
+    }
+    copy {
+      from "${projectDir}/../../bin/mac/amd64/OpenWhisk_CLI-mac.zip"
+      into "${projectDir}/build/mac/amd64/"
+    }
+    copy {
+      from 
"${projectDir}/../../bin/windows/386/OpenWhisk_CLI-windows-32bit.zip"
+      into "${projectDir}/build/windows/386/"
+    }
+    copy {
+      from "${projectDir}/../../bin/windows/amd64/OpenWhisk_CLI-windows.zip"
+      into "${projectDir}/build/windows/amd64/"
+    }
+  }
+}
 
 Review comment:
   We should have a look if this is worth being replaced by two `Exec` tasks 
just doing a `cp` or using a `Copy` task directly. Seems quite error prone.
 
----------------------------------------------------------------
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