/* * 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. */ // Generated by http://patorjk.com/software/taag/#p=display&f=Bloody&t=Apache%20Bigtop def final ASCII_bigtop = ''' :aass.. =XS22nai,>__. . =n-- +!!!""^-- .vX> . .)e . ..=-?Xo>, . . . .__aaoZe!`=>.+*a>,.-"!Y1XSSX##ZZXXXXXXXXXXXoXXc .{XXXXXX2*?!!"!"^~--- ...__aa2!^- =dX( .+XXc. ~!1nas,,.---~~^""!"!!!?YSXXXXX2+ -"YSXXXo=. ._=sssaaav1!!~- ._aXXe` )SXo>. -~"?Yoouass_s,, _vXXXX2}~ -{XXZoai%%*XXSSSX>.. . - ---=2XXX2^-"|||}"--~{ZXXX1-- .:XXXXo; . )XXXX2` . =XXXXZc nXXXX> =XXXXe..__s=>_...)XXXX1 . .:SXXXo; .)XXXX2.. =XXXXosummmmBmma,)ZXXX1 :XXXX2; )XXXXX. . :XXXXXc . . =oZXXXe; .)" def command = [ '/bin/echo', message ] commandLine command } task "docker-provisioner-status"(type:Exec, description: 'Show status of Bigtop Docker cluster', group: DEPLOY_GROUP) { def command = [ 'vagrant', 'status', ] workingDir 'bigtop-deploy/vm/vagrant-puppet-docker' commandLine command } task "docker-provisioner-destroy"(type:Exec, description: 'Destroy provisioned Bigtop Docker cluster', group: DEPLOY_GROUP) { def command = [ './docker-hadoop.sh', '--destroy' ] workingDir 'bigtop-deploy/vm/vagrant-puppet-docker' commandLine command } task installTopLevel(type:Exec) { workingDir "." commandLine 'mvn clean install -f pom.xml'.split(" ") } task installiTest(dependsOn: installTopLevel, type:Exec) { workingDir "." commandLine 'mvn clean install -f bigtop-test-framework/pom.xml -DskipTests'.split(" ") } task installTestArtifacts(dependsOn: installiTest, type:Exec) { workingDir "." commandLine 'mvn clean install -f bigtop-tests/test-artifacts/pom.xml'.split(" ") } task installConf(type:Exec) { workingDir "." commandLine 'mvn clean install -f bigtop-tests/test-execution/conf/pom.xml'.split(" ") } task installCommon(type:Exec) { workingDir "." commandLine 'mvn clean install -f bigtop-tests/test-execution/common/pom.xml'.split(" ") } task installAllLocalArtifacts ( description: "Prepare and locally install all test artifacts", group: TESTARTIFACTS_GROUP) { } /** * Allows user to specify which artifacts to install by dynamically generating tasks. */ def artifactToInstall = { def final BASE_DIR = projectDir.absolutePath def final TEST_DIR = "$BASE_DIR/bigtop-tests/test-artifacts" def project = new XmlSlurper().parse("$TEST_DIR/pom.xml") project.modules.module.each { artifact -> task "install-${artifact}" (description: "Installs ${artifact} artifact with Maven", group: TESTARTIFACTS_GROUP, dependsOn: installiTest ) << { def final PATH = "${TEST_DIR}/$artifact/pom.xml" def final WRAPPER = "mvn clean install -f " + PATH exec { workingDir '.' commandLine WRAPPER.split(" ") } } } } project.afterEvaluate{ artifactToInstall(dependsOn: [installTopLevel, installCommon, installConf, installiTest]) } installAllLocalArtifacts.dependsOn installTopLevel, installCommon, installConf, installiTest, installTestArtifacts help.doFirst { println ASCII_bigtop } repositories { maven { url "http://repository.apache.org/snapshots" } maven { url "http://repo.maven.apache.org/maven2" } } buildscript { repositories { mavenCentral() } dependencies { classpath 'de.undercouch:gradle-download-task:1.0' } }