bigtop-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From evan...@apache.org
Subject bigtop git commit: BIGTOP-2949. Add gradle task which leverage bigtop-ci/build.sh to build packages
Date Sun, 04 Feb 2018 09:06:19 GMT
Repository: bigtop
Updated Branches:
  refs/heads/master 943ea913d -> 44f4293b1


BIGTOP-2949. Add gradle task which leverage bigtop-ci/build.sh to build packages


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

Branch: refs/heads/master
Commit: 44f4293b18f8f85c012e8581ca05eaa097b42d7c
Parents: 943ea91
Author: Evans Ye <evansye@apache.org>
Authored: Wed Nov 29 00:22:14 2017 +0800
Committer: Evans Ye <evansye@apache.org>
Committed: Sun Feb 4 17:05:37 2018 +0800

----------------------------------------------------------------------
 bigtop-ci/build.sh |  2 ++
 packages.gradle    | 21 +++++++++++++++++++++
 2 files changed, 23 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/bigtop/blob/44f4293b/bigtop-ci/build.sh
----------------------------------------------------------------------
diff --git a/bigtop-ci/build.sh b/bigtop-ci/build.sh
index d0a0ff5..9445891 100755
--- a/bigtop-ci/build.sh
+++ b/bigtop-ci/build.sh
@@ -66,3 +66,5 @@ docker run --name container-$OS-$TARGET-$$ $NEXUS image-$OS $CONFIGURE_NEXUS
$TA
 mkdir -p output
 docker cp container-$OS-$TARGET-$$:/var/lib/jenkins/bigtop/output .
 docker rm -v container-$OS-$TARGET-$$
+docker rmi image-$OS
+rm -rf Dockerfile

http://git-wip-us.apache.org/repos/asf/bigtop/blob/44f4293b/packages.gradle
----------------------------------------------------------------------
diff --git a/packages.gradle b/packages.gradle
index 2ca98ec..140a08b 100644
--- a/packages.gradle
+++ b/packages.gradle
@@ -571,6 +571,27 @@ def genTasks = { target ->
         group: PACKAGES_GROUP) doLast {
     }
   }
+  task "$target-pkg-ind" (
+          description: "Invoking a native binary packaging for $target in Docker. Usage:
\$ ./gradlew " +
+                  "-POS=[centos-7|fedora-26|debian-9|ubuntu-16.04|opensuse-42.3] " +
+                  "-Pprefix=[trunk|1.2.1|1.2.0|1.1.0|...] $target-pkg-ind",
+          group: PACKAGES_GROUP) doLast {
+    def _prefix = project.hasProperty("prefix") ? prefix : "trunk"
+    def _OS = project.hasProperty("OS") ? OS : "centos-7"
+    def _target_pkg = "$target-pkg"
+    def command = [
+            './bigtop-ci/build.sh',
+            '--os', _prefix + '-' + _OS,
+            '--target', _target_pkg
+    ]
+
+    println "Building $_prefix $_target_pkg on $_OS in Docker...\n"
+
+    exec {
+      workingDir BASE_DIR
+      commandLine command
+    }
+  }
   task "$target-version" (description: "Show version of $target component", group: PACKAGES_GROUP)
doLast {
     println "Base: ${config.bigtop.components[target].version.base}"
   }


Mime
View raw message