dependencies { compile project(":p4base") compile project(":client-java") compile project(":deployment") compile fileTree(dir: 'vendor', include: '*.jar', exclude: '*-sources.jar') } // Please note that the JNA dependency is not downloaded from Maven central. dependencies { vendor "commons-net:commons-net:3.3" vendor "commons-net:commons-net:3.3:sources" vendor 'net.lingala.zip4j:zip4j:1.3.2' vendor 'net.lingala.zip4j:zip4j:1.3.2:sources' vendor 'io.jsonwebtoken:jjwt:0.6.0' vendor 'io.jsonwebtoken:jjwt:0.6.0:sources' vendor 'org.apache.logging.log4j:log4j-core:2.5' vendor 'org.apache.logging.log4j:log4j-core:2.5:sources' vendor 'org.apache.logging.log4j:log4j-slf4j-impl:2.5' vendor 'org.apache.logging.log4j:log4j-slf4j-impl:2.5:sources' } configurations { vendor.exclude group: "org.slf4j", module: "slf4j-api" } // This will create a "fat jar" jar { archiveName "automation.jar" dependsOn configurations.runtime from { configurations.runtime.collect { it.isDirectory() ? it : zipTree(it) } } manifest { attributes("Main-Class": "com.perforce.hws.automation.Basic16_1EnvironmentSetup") } } task basicMainlineEnvironmentSetup(type: JavaExec) { description 'Starts and initializes a basic p4d for typical HWS usage (note RUNS IN FOREGROUND)' classpath = sourceSets.main.runtimeClasspath main = 'com.perforce.hws.automation.BasicMainlineEnvironmentSetup' } task basic16_1EnvironmentSetup(type: JavaExec) { description 'Starts and initializes a basic p4d for typical HWS usage (note RUNS IN FOREGROUND)' classpath = sourceSets.main.runtimeClasspath jvmArgs "-Dlog4j.configurationFile=${file('./log4j.xml').canonicalPath}" main = 'com.perforce.hws.automation.Basic16_1EnvironmentSetup' } task cloudEnvironmentSetup(type: JavaExec) { description 'Starts and initializes p4d and mock_raymond for Helix Cloud testing' classpath = sourceSets.main.runtimeClasspath main = 'com.perforce.hws.automation.CloudEnvironmentSetup' } task cleanup(type: JavaExec) { description 'Shuts down all applications running in the background' classpath = sourceSets.main.runtimeClasspath jvmArgs "-Dlog4j.configurationFile=${file('./log4j.xml').canonicalPath}" main = 'com.perforce.hws.automation.Cleanup' } task createRPM(type: JavaExec) { description 'Uses rpmbuild to create an .rpm from the binary archive in standard EC location' classpath = sourceSets.main.runtimeClasspath main 'com.perforce.hws.automation.CreateRPM' args file('../../../p4-bin/bin.noarch/helix-web-services-bin.tar.gz').canonicalPath, file('../helix-web-services-rpm.tgz').canonicalPath } task createRPMLocal(type: JavaExec) { description 'Uses rpmbuild to create an .rpm from the binary archive in local install4j location' classpath = sourceSets.main.runtimeClasspath main 'com.perforce.hws.automation.CreateRPM' args file('../install4j/build/helix-web-services-bin.tar.gz').canonicalPath, file('../helix-web-services-rpm.tgz').canonicalPath } task deployBinaryArchive(type: JavaExec) { description 'Deploys our binary archive file' classpath = sourceSets.main.runtimeClasspath jvmArgs "-Dlog4j.configurationFile=${file('./log4j.xml').canonicalPath}" main 'com.perforce.hws.automation.DeployBinaryArchive' if (System.getProperty("os.name").startsWith("Windows")) { args file('../../../p4-bin/bin.ntx64/helix-web-services-bin-pretest.zip').canonicalPath } else { args file('../../../p4-bin/bin.noarch/helix-web-services-bin-pretest.tar.gz').canonicalPath } } task deployDebPackage(type: JavaExec) { description 'Deploys the .deb package' classpath = sourceSets.main.runtimeClasspath main 'com.perforce.hws.automation.DeployDebPackage' jvmArgs "-Dlog4j.configurationFile=${file('./log4j.xml').canonicalPath}" args file('../../../p4-bin/bin.ubuntu12x86_64/helix-web-services-deb-pretest.tgz').canonicalPath } task deployRpmPackage(type: JavaExec) { description 'Deploys the .rpm package' classpath = sourceSets.main.runtimeClasspath main 'com.perforce.hws.automation.DeployRpmPackage' jvmArgs "-Dlog4j.configurationFile=${file('./log4j.xml').canonicalPath}" args file('../../../p4-bin/bin.centos6x86_64/helix-web-services-rpm-pretest.tgz').canonicalPath } task upgradeDebPackage(type: JavaExec) { description 'Deploys the .rpm package' classpath = sourceSets.main.runtimeClasspath main 'com.perforce.hws.automation.UpgradeDebPackage' jvmArgs "-Dlog4j.configurationFile=${file('./log4j.xml').canonicalPath}" args file("./packages/ubuntu-12/helix-web-services_2016.1.0-1387282_amd64.deb").canonicalPath, file('../../../p4-bin/bin.ubuntu12x86_64/helix-web-services-deb-pretest.tgz').canonicalPath } task deploymentCleanup(type: JavaExec) { description 'Cleans up installed environment (must be run as root)' classpath = sourceSets.main.runtimeClasspath jvmArgs "-Dlog4j.configurationFile=${file('./log4j.xml').canonicalPath}" main = 'com.perforce.hws.automation.DeploymentCleanup' } task gitFusionEnvironmentSetup(type: JavaExec) { description 'Starts and initializes p4d (16.1), HWS, and git fusion, for HWS integration' classpath = sourceSets.main.runtimeClasspath main = 'com.perforce.hws.automation.GitFusionEnvironmentSetup' } task simulateEcBuild(type: JavaExec) { description 'Simulates hws.build job locally' classpath = sourceSets.main.runtimeClasspath main = 'com.perforce.hws.automation.SimulateECBuild' } task simulateEcTestBinaryTgz(type: JavaExec) { description 'Simulates hws.test-binary-tgz job locally' classpath = sourceSets.main.runtimeClasspath main = 'com.perforce.hws.automation.SimulateECTestBinaryTgz' } task simulateEcTestBinaryZip(type: JavaExec) { description 'Simulates hws.test-binary-zip job locally' classpath = sourceSets.main.runtimeClasspath main = 'com.perforce.hws.automation.SimulateECTestBinaryZip' } task simulateEcTestDeb(type: JavaExec) { description 'Simulates hws.test-binary-tgz job locally' classpath = sourceSets.main.runtimeClasspath main = 'com.perforce.hws.automation.SimulateECTestDeb' } task simulateEcRpm(type: JavaExec) { description 'Simulates hws.rpm job locally (run on a CentOS machine)' classpath = sourceSets.main.runtimeClasspath main = 'com.perforce.hws.automation.SimulateECRpm' } task simulateEcTestRpm(type: JavaExec) { description 'Simulates hws.test-rpm job locally (run on a CentOS machine)' classpath = sourceSets.main.runtimeClasspath main = 'com.perforce.hws.automation.SimulateECTestRpm' } task createJwtSigningToken(type: JavaExec) { description 'Generates a random secure key for signing' classpath = sourceSets.main.runtimeClasspath main = 'com.perforce.hws.automation.CreateJwtSigningToken' }