You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@bigtop.apache.org by rv...@apache.org on 2017/03/25 02:44:29 UTC

bigtop git commit: BIGTOP-2306. Add support for specifying git repository access credentials

Repository: bigtop
Updated Branches:
  refs/heads/master da1ccfda1 -> dc14acdfa


BIGTOP-2306. Add support for specifying git repository access credentials


Project: http://git-wip-us.apache.org/repos/asf/bigtop/repo
Commit: http://git-wip-us.apache.org/repos/asf/bigtop/commit/dc14acdf
Tree: http://git-wip-us.apache.org/repos/asf/bigtop/tree/dc14acdf
Diff: http://git-wip-us.apache.org/repos/asf/bigtop/diff/dc14acdf

Branch: refs/heads/master
Commit: dc14acdfa6f13e738d73ea5e3ec88abc965b47a1
Parents: da1ccfd
Author: Roman Shaposhnik <rv...@apache.org>
Authored: Fri Mar 24 19:43:10 2017 -0700
Committer: Roman Shaposhnik <rv...@apache.org>
Committed: Fri Mar 24 19:43:10 2017 -0700

----------------------------------------------------------------------
 bigtop.bom      | 5 +++++
 packages.gradle | 9 ++-------
 2 files changed, 7 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/bigtop/blob/dc14acdf/bigtop.bom
----------------------------------------------------------------------
diff --git a/bigtop.bom b/bigtop.bom
index 781d8aa..3b8ae6e 100644
--- a/bigtop.bom
+++ b/bigtop.bom
@@ -44,6 +44,11 @@
      APACHE_MIRROR = "http://apache.osuosl.org"
      APACHE_ARCHIVE = "https://archive.apache.org/dist"
    }
+   git { // *optional* This is a global setting to access protected git repositories, 
+         //            can be specified per component as well
+     user = "john_doe"
+     token = "john's access token"
+   }
    components { *required; preserve the name* if empty, nothing will be built
      'label' { // label *SHOULD* be the same as the name; otherwise some tasks will fail
        name    = 'component1' // *required* the name of the component

http://git-wip-us.apache.org/repos/asf/bigtop/blob/dc14acdf/packages.gradle
----------------------------------------------------------------------
diff --git a/packages.gradle b/packages.gradle
index 3d499c6..8576ab1 100644
--- a/packages.gradle
+++ b/packages.gradle
@@ -179,13 +179,8 @@ def genTasks = { target ->
     def final GIT_REPO = config.bigtop.components[target].git.repo
     def final GIT_REF = config.bigtop.components[target].git.ref
     def final GIT_DIR = config.bigtop.components[target].git.dir
-
-    def GIT_USER_NAME = BOM_map[variable + '_GIT_USER_NAME']
-    if (!GIT_USER_NAME)
-      GIT_USER_NAME = BOM_map['GIT_USER_NAME']
-    def GIT_ACCESS_TOKEN = BOM_map[variable + '_GIT_ACCESS_TOKEN']
-    if (!GIT_ACCESS_TOKEN)
-      GIT_ACCESS_TOKEN = BOM_map['GIT_ACCESS_TOKEN']
+    def final GIT_USER_NAME = config.bigtop.components[target].git.user ?: config.bigtop.git.user
+    def final GIT_ACCESS_TOKEN = config.bigtop.components[target].git.token ?: config.bigtop.git.token
 
     def devNull = new org.apache.bigtop.NullOutputStream()