|
| 1 | +// Copyright 2024 The Nomulus Authors. All Rights Reserved. |
| 2 | +// |
| 3 | +// Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | +// you may not use this file except in compliance with the License. |
| 5 | +// You may obtain a copy of the License at |
| 6 | +// |
| 7 | +// http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | +// |
| 9 | +// Unless required by applicable law or agreed to in writing, software |
| 10 | +// distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | +// See the License for the specific language governing permissions and |
| 13 | +// limitations under the License. |
| 14 | + |
| 15 | +apply plugin: 'java' |
| 16 | + |
| 17 | +createUberJar('buildLoadTestClient', 'loadTest', 'google.registry.client.EppClient') |
| 18 | + |
| 19 | +dependencies { |
| 20 | + def deps = rootProject.dependencyMap |
| 21 | + implementation deps['joda-time:joda-time'] |
| 22 | + implementation deps['io.netty:netty-buffer'] |
| 23 | + implementation deps['io.netty:netty-codec'] |
| 24 | + implementation deps['io.netty:netty-codec-http'] |
| 25 | + implementation deps['io.netty:netty-common'] |
| 26 | + implementation deps['io.netty:netty-handler'] |
| 27 | + implementation deps['io.netty:netty-transport'] |
| 28 | + implementation deps['com.google.guava:guava'] |
| 29 | + implementation deps['org.bouncycastle:bcpg-jdk18on'] |
| 30 | + implementation deps['org.bouncycastle:bcpkix-jdk18on'] |
| 31 | + implementation deps['org.bouncycastle:bcprov-jdk18on'] |
| 32 | + implementation deps['org.jcommander:jcommander'] |
| 33 | + implementation deps['com.google.flogger:flogger'] |
| 34 | + runtimeOnly deps['com.google.flogger:flogger-system-backend'] |
| 35 | +} |
| 36 | + |
| 37 | +task makeStagingDirectory { |
| 38 | + mkdir layout.buildDirectory.dir('stage') |
| 39 | +} |
| 40 | + |
| 41 | +task copyFilesToStaging(dependsOn: makeStagingDirectory, type: Copy) { |
| 42 | + from layout.buildDirectory.file('libs/loadTest.jar'), "${projectDir}/certificate.pem", "${projectDir}/key.pem" |
| 43 | + into layout.buildDirectory.dir('stage') |
| 44 | +} |
| 45 | + |
| 46 | +task deployLoadTestsToInstances (dependsOn: copyFilesToStaging, type: Exec) { |
| 47 | + executable "sh" |
| 48 | + workingDir "${projectDir}/" |
| 49 | + args "-c", "./deploy.sh" |
| 50 | +} |
| 51 | + |
| 52 | +test { |
| 53 | + useJUnitPlatform() |
| 54 | +} |
0 commit comments