jonpspri commented on a change in pull request #184: Create tarball for Nginx 
container in OpenWhisk as part of release deploy script
URL: 
https://github.com/apache/incubator-openwhisk-cli/pull/184#discussion_r162811818
 
 

 ##########
 File path: build.gradle
 ##########
 @@ -1,93 +1,290 @@
-ext.dockerImageName = "cli"
-ext.dockerContainerName = "cli"
-ext.dockerBuildArgs = getDockerBuildArgs()
-apply from: 'gradle/docker.gradle'
-
+/*
+    Holding these lines for when gogradle 0.8.1 is released.
+plugins {
+    id 'com.github.blindpirate.gogradle' version '0.8.1'
+}
+*/
 
-task removeBinary(type: Delete) {
-    delete "${projectDir}/bin/wsk"
-    delete "${projectDir}/bin/mac"
-    delete "${projectDir}/bin/linux"
-    delete "${projectDir}/bin/windows"
+buildscript {
+    repositories {
+        mavenLocal()
+        jcenter()
+    }
+    dependencies {
+        classpath "org.antlr:antlr4:4.6"
+        classpath group: 'com.google.inject', name: 'guice', version: '4.1.0'
+        classpath group: 'org.apache.commons', name: 'commons-lang3', version: 
'3.5'
+        classpath group: 'org.apache.commons', name: 'commons-collections4', 
version: '4.1'
+        classpath group: 'commons-codec', name: 'commons-codec', version: 
'1.10'
+        classpath group: 'commons-io', name: 'commons-io', version: '2.5'
+        classpath 'com.google.guava:guava:20.0'
+        classpath 'com.github.zafarkhaja:java-semver:0.9.0'
+        classpath group: 'org.jsoup', name: 'jsoup', version: '1.7.2'
+        classpath group: 'com.fasterxml.jackson.core', name: 
'jackson-databind', version: '2.8.5'
+        classpath group: 'com.fasterxml.jackson.core', name: 
'jackson-annotations', version: '2.8.5'
+        classpath group: 'com.google.code.findbugs', name: 'annotations', 
version: '3.0.1'
+        classpath group: 'com.fasterxml.jackson.dataformat', name: 
'jackson-dataformat-yaml', version: '2.8.5'
+        classpath group: 'net.lingala.zip4j', name: 'zip4j', version: '1.3.2'
+        classpath group: 'org.apache.ant', name: 'ant', version: '1.10.0'
+        classpath group: 'com.typesafe.sbt', name: 'sbt-interface', version: 
'0.13.13'
+        classpath group: 'com.fasterxml.jackson.dataformat', name: 
'jackson-dataformat-xml', version: '2.6.3'
+        classpath group: 'org.codehaus.woodstox', name: 'woodstox-core-asl', 
version: '4.4.1'
+        classpath group: 'org.jooq', name: 'joor', version: '0.9.6'
+        classpath 'com.moandjiezana.toml:toml4j:0.7.2'
+        classpath files('../gogradle/build/libs/gogradle-0.8.1.jar')
+    }
 }
 
-task distBinary(dependsOn: [removeBinary, buildBinaries]) {
-    doLast {
-        run(dockerBinary + ["rm", "-f", dockerContainerName], true)
-        run(dockerBinary + ["run", "--name", dockerContainerName, 
dockerTaggedImageName])
+apply plugin: 'com.github.blindpirate.gogradle'
 
-        // Copy all Go binaries from Docker into openwhisk/bin folder
-        run(dockerBinary + ["cp", dockerContainerName +
-                ":/src/github.com/apache/incubator-openwhisk-cli/build/.", 
"${projectDir}/bin"])
+golang {
+    packagePath = 'github.com/apache/incubator-openwhisk-cli' as String
+    buildTags = (rootProject.findProperty('goTags')?:'').split(',')
+}
 
-        run(dockerBinary + ["rm", "-f", dockerContainerName])
+dependencies {
+    golang {
+        // TODO - validate where version should and should not be locked.
+        // BEGIN - Imported from Godeps
+        build(['name':'github.com/cloudfoundry/jibber_jabber', 
'version':'bcc4c8345a21301bf47c032ff42dd1aae2fe3027', 'transitive':false])
+        build(['name':'github.com/fatih/color', 
'version':'87d4004f2ab62d0d255e0a38f1680aa534549fe3', 'transitive':false])
+        build(['name':'github.com/google/go-querystring/query', 
'version':'9235644dd9e52eeae6fa48efd539fdc351a0af53', 'transitive':false])
+        build(['name':'github.com/hokaccha/go-prettyjson', 
'version':'f75235bd99dad4e98ff360db8372d5c0ef1d054a', 'transitive':false])
+        build(['name':'github.com/inconshreveable/mousetrap', 
'version':'76626ae9c91c4f2a10f34cad8ce83ea42c93bb75', 'transitive':false])
+        build(['name':'github.com/mattn/go-colorable', 
'version':'d228849504861217f796da67fae4f6e347643f15', 'transitive':false])
+        build(['name':'github.com/mattn/go-isatty', 
'version':'66b8e73f3f5cda9f96b69efd03dd3d7fc4a5cdb8', 'transitive':false])
+        build(['name':'github.com/mitchellh/go-homedir', 
'version':'1111e456ffea841564ac0fa5f69c26ef44dafec9', 'transitive':false])
+        build(['name':'github.com/nicksnyder/go-i18n/i18n/...', 
'version':'37e5c2de3e03e4b82693e3fcb4a6aa2cc4eb07e3', 'transitive':false])
+        build(['name':'github.com/spf13/cobra', 
'version':'1238ba19d24b0b9ceee2094e1cb31947d45c3e86', 'transitive':false])
+        build(['name':'github.com/spf13/pflag', 
'version':'367864438f1b1a3c7db4da06a2f55b144e6784e0', 'transitive':false])
+        build(['name':'golang.org/x/sys/unix', 
'version':'7f918dd405547ecb864d14a8ecbbfe205b5f930f', 'transitive':false])
+        build(['name':'gopkg.in/yaml.v2', 
'version':'cd8b52f8269e0feb286dfeef29f8fe4d5b397e0b', 'transitive':false])
+        build(['name':'github.com/ghodss/yaml', 
'version':'0ca9ea5df5451ffdf184b4428c902747c2c11cd7', 'transitive':false])
+        
build(['name':'github.com/apache/incubator-openwhisk-client-go/whisk','version':'a67e8509a92beb6c68f0c9da43562af1f5d2b13c','transitive':false])
+        // END - Imported from Godeps
+        test name:'github.com/golang/lint/golint', 
version:'e14d9b0f1d332b1420c1ffa32562ad2dc84d645d', transitive:false
 
 Review comment:
   Actually, the linter needs to be pulled in in .travis.yml, because the build 
expects the binary to be in the execution path.  I made that change to 
.travis.yml.

----------------------------------------------------------------
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