[ 
https://issues.apache.org/jira/browse/BEAM-3804?focusedWorklogId=78963&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-78963
 ]

ASF GitHub Bot logged work on BEAM-3804:
----------------------------------------

                Author: ASF GitHub Bot
            Created on: 09/Mar/18 18:22
            Start Date: 09/Mar/18 18:22
    Worklog Time Spent: 10m 
      Work Description: lukecwik closed pull request #4833: [BEAM-3804] Build 
Go SDK container with gradle
URL: https://github.com/apache/beam/pull/4833
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/sdks/go/container/build.gradle b/sdks/go/container/build.gradle
new file mode 100644
index 00000000000..b1877d96c4e
--- /dev/null
+++ b/sdks/go/container/build.gradle
@@ -0,0 +1,59 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * License); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an AS IS BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+apply from: project(":").file("build_rules.gradle")
+applyGoNature()
+applyDockerNature()
+
+description = "Apache Beam :: SDKs :: Go :: Container"
+
+// Figure out why the golang plugin does not add a build dependency between 
projects.
+// Without the line below, we get spurious errors about not being able to 
resolve
+// "./github.com/apache/beam/sdks/go"
+resolveBuildDependencies.dependsOn ":sdks:go:build"
+
+dependencies {
+  golang {
+    // TODO(herohde): use "./" prefix to prevent gogradle use base github 
path, for now.
+    // TODO(herohde): get the pkg subdirectory only, if possible. We spend 
mins pulling cmd/beamctl deps.
+    build name: './github.com/apache/beam/sdks/go', dir: 
project(':sdks:go').projectDir
+    test name: './github.com/apache/beam/sdks/go', dir: 
project(':sdks:go').projectDir
+  }
+}
+
+golang {
+  packagePath = 'github.com/apache/beam/sdks/go/boot'
+  build {
+    // TODO(herohde): build local platform + linux-amd64, if possible.
+    targetPlatform = ['linux-amd64']
+    outputLocation = './build/target/${GOOS}_${GOARCH}/boot'
+  }
+}
+
+docker {
+  String repositoryRoot
+  if (rootProject.hasProperty(["docker-repository-root"])) {
+    repositoryRoot = rootProject["docker-repository-root"]
+  } else {
+    repositoryRoot = 
"${System.properties["user.name"]}-docker-apache.bintray.io/beam"
+  }
+  name "${repositoryRoot}/go:latest"
+  files "./build/"
+}
+// Ensure that making the docker image builds any required artifacts
+dockerPrepare.dependsOn build
diff --git a/settings.gradle b/settings.gradle
index 8446c45c6c9..4dc1665cdfa 100644
--- a/settings.gradle
+++ b/settings.gradle
@@ -37,6 +37,7 @@ include ":runners:reference:java"
 include ":runners:reference:job-server"
 include ":runners:spark"
 include ":sdks:go"
+include ":sdks:go:container"
 include ":sdks:java:build-tools"
 include ":sdks:java:container"
 include ":sdks:java:core"


 

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


Issue Time Tracking
-------------------

    Worklog Id:     (was: 78963)
    Time Spent: 1h 20m  (was: 1h 10m)

> Build Go SDK container with Gradle
> ----------------------------------
>
>                 Key: BEAM-3804
>                 URL: https://issues.apache.org/jira/browse/BEAM-3804
>             Project: Beam
>          Issue Type: Sub-task
>          Components: sdk-go
>            Reporter: Henning Rohde
>            Assignee: Henning Rohde
>            Priority: Minor
>          Time Spent: 1h 20m
>  Remaining Estimate: 0h
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to