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

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

                Author: ASF GitHub Bot
            Created on: 04/Jan/19 20:06
            Start Date: 04/Jan/19 20:06
    Worklog Time Spent: 10m 
      Work Description: kennknowles commented on pull request #7312: 
[BEAM-6228] Ensure the website can build without a git repository
URL: https://github.com/apache/beam/pull/7312#discussion_r245406419
 
 

 ##########
 File path: website/build.gradle
 ##########
 @@ -139,9 +139,14 @@ createBuildTask( name:'Gcs', useTestConfig: true, 
baseUrl: getBaseUrl(), dockerW
 createBuildTask( name:'Apache', dockerWorkDir: dockerWorkDir)
 
 def getBaseUrl() {
-  System.getenv('ghprbPullId')?.trim() ?:
-    "${System.getProperty('user.name')}-${grgit.branch.current().getName()}"
+  def pullRequestId = System.getenv('ghprbPullId')?.trim()
+  if (pullRequestId) { return pullRequestId }
+
+  // grgit is null if building outside of git (i.e. from source archive)
+  def buildContext = grgit ? grgit.branch.current().getName() : 'archive'
 
 Review comment:
   The reason to base it on the branch is for a pretty URL when you browse? Or 
is it to avoid clobbering directories on disk, so you can have multiple 
renderings sitting in `build/` or whatnot? TBH I don't know what grgit is doing 
in this context (in the others seems obvious, localized, totally sensible).
 
----------------------------------------------------------------
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: 181292)
    Time Spent: 1h  (was: 50m)

> Website build from source release fails due to git dependency
> -------------------------------------------------------------
>
>                 Key: BEAM-6228
>                 URL: https://issues.apache.org/jira/browse/BEAM-6228
>             Project: Beam
>          Issue Type: New Feature
>          Components: website
>            Reporter: Scott Wegner
>            Priority: Minor
>          Time Spent: 1h
>  Remaining Estimate: 0h
>
> The website build assumes a git environment, and will fail if built outside 
> of git. As a result, we cannot build the website from the source release.
> [~kenn] noticed this during 2.9.0 release validation. See: 
> https://lists.apache.org/thread.html/dc816a5f8c82dd4d19e82666209305ec67d46440fe8edba4534f9b63@%3Cdev.beam.apache.org%3E
> {code}
> > Configure project :beam-website
> No git repository found for :beam-website. Accessing grgit will cause an NPE.
> FAILURE: Build failed with an exception.
> * Where:
> Build file 'website/build.gradle' line: 143
> * What went wrong:
> A problem occurred evaluating project ':beam-website'.
> > Cannot get property 'branch' on null object
> {code}



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

Reply via email to