mirror of
https://github.com/google/nomulus.git
synced 2025-05-14 00:17:20 +02:00
Use local credential to deploy beam pipelines
We are moving away from using Application Default Credentials generated by "gcloud auth application-default login" in our code base and consolidate on using self-managed credentials provided from AuthModule. One of the remaining dependencies on the ADCs is from beam pipeline deployment commands, which by default use the ADCs to talk to GCS and upload the jar files and templates. In this CL, we explicitly provide the locally created credential to the Options used in deployments. Also moved all credential qualifiers to CredentialModule, and removed @AppEngineAdminApiCredential, which is no longer used. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=224199812
This commit is contained in:
parent
fdda03eb53
commit
a612e9bf66
12 changed files with 77 additions and 67 deletions
|
@ -17,6 +17,7 @@ package google.registry.tools;
|
|||
import static com.google.common.base.Preconditions.checkState;
|
||||
import static google.registry.model.ofy.ObjectifyService.ofy;
|
||||
import static google.registry.tools.Injector.injectReflectively;
|
||||
import static java.nio.charset.StandardCharsets.UTF_8;
|
||||
|
||||
import com.beust.jcommander.JCommander;
|
||||
import com.beust.jcommander.Parameter;
|
||||
|
@ -32,6 +33,7 @@ import google.registry.config.RegistryConfig;
|
|||
import google.registry.model.ofy.ObjectifyService;
|
||||
import google.registry.tools.AuthModule.LoginRequiredException;
|
||||
import google.registry.tools.params.ParameterFactory;
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.net.URL;
|
||||
import java.security.Security;
|
||||
import java.util.Map;
|
||||
|
@ -211,7 +213,7 @@ final class RegistryCli implements AutoCloseable, CommandRunner {
|
|||
options.useDevelopmentServerCredential();
|
||||
} else {
|
||||
RemoteApiOptionsUtil.useGoogleCredentialStream(
|
||||
options, component.googleCredentialStream().get());
|
||||
options, new ByteArrayInputStream(component.googleCredentialJson().getBytes(UTF_8)));
|
||||
}
|
||||
installer.install(options);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue