diff --git a/java/google/registry/tools/BUILD b/java/google/registry/tools/BUILD index 65285bffd..edaf5f4f1 100644 --- a/java/google/registry/tools/BUILD +++ b/java/google/registry/tools/BUILD @@ -36,6 +36,7 @@ java_library( visibility = [":allowed-tools"], deps = [ "//java/google/registry/backup", + "//java/google/registry/beam", "//java/google/registry/bigquery", "//java/google/registry/config", "//java/google/registry/dns", diff --git a/java/google/registry/tools/DeployInvoicingPipelineCommand.java b/java/google/registry/tools/DeployInvoicingPipelineCommand.java new file mode 100644 index 000000000..44d791aac --- /dev/null +++ b/java/google/registry/tools/DeployInvoicingPipelineCommand.java @@ -0,0 +1,31 @@ +// Copyright 2017 The Nomulus Authors. All Rights Reserved. +// +// Licensed 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. + +package google.registry.tools; + +import com.beust.jcommander.Parameters; +import google.registry.beam.InvoicingPipeline; +import javax.inject.Inject; + +/** Nomulus command that deploys the {@link google.registry.beam.InvoicingPipeline} template. */ +@Parameters(commandDescription = "Deploy the invoicing pipeline to GCS.") +public class DeployInvoicingPipelineCommand implements Command { + + @Inject InvoicingPipeline invoicingPipeline; + + @Override + public void run() throws Exception { + invoicingPipeline.deploy(); + } +} diff --git a/java/google/registry/tools/RegistryTool.java b/java/google/registry/tools/RegistryTool.java index e9755ffc6..29cb933d7 100644 --- a/java/google/registry/tools/RegistryTool.java +++ b/java/google/registry/tools/RegistryTool.java @@ -55,6 +55,7 @@ public final class RegistryTool { .put("delete_premium_list", DeletePremiumListCommand.class) .put("delete_reserved_list", DeleteReservedListCommand.class) .put("delete_tld", DeleteTldCommand.class) + .put("deploy_invoicing_pipeline", DeployInvoicingPipelineCommand.class) .put("domain_application_info", DomainApplicationInfoCommand.class) .put("domain_check", DomainCheckCommand.class) .put("domain_check_claims", DomainCheckClaimsCommand.class) diff --git a/java/google/registry/tools/RegistryToolComponent.java b/java/google/registry/tools/RegistryToolComponent.java index 8d5d3cc15..5a244a487 100644 --- a/java/google/registry/tools/RegistryToolComponent.java +++ b/java/google/registry/tools/RegistryToolComponent.java @@ -81,6 +81,7 @@ interface RegistryToolComponent { void inject(CreateDomainCommand command); void inject(CreateLrpTokensCommand command); void inject(CreateTldCommand command); + void inject(DeployInvoicingPipelineCommand command); void inject(EncryptEscrowDepositCommand command); void inject(GenerateApplicationsReportCommand command); void inject(GenerateDnsReportCommand command);