checking if env is local to disable ssl

This commit is contained in:
Gabriel Rosa
2022-08-23 09:01:17 -03:00
parent 09e3b3fd33
commit 3bfcc7a412
7 changed files with 25 additions and 7 deletions
+4 -1
View File
@@ -17,7 +17,10 @@ export class ConnectionClientConfiguration {
ConnectionManager.ProtoPackages.ReadPackage,
],
// credentials: undefined,
credentials: process.env.LOCAL_ENV ? undefined : credentials.createSsl(),
credentials:
process.env.LOCAL_ENV || process.env.ENV === 'local'
? undefined
: credentials.createSsl(),
protoPath: [
ConnectionManager.ProtoPaths.WriteFilePath,
ConnectionManager.ProtoPaths.ReadFilePath,
+4 -1
View File
@@ -16,7 +16,10 @@ export class ConnectorClientConfiguration {
ConnectorManager.ProtoPackages.WritePackage,
ConnectorManager.ProtoPackages.ReadPackage,
],
credentials: process.env.LOCAL_ENV ? undefined : credentials.createSsl(),
credentials:
process.env.LOCAL_ENV || process.env.ENV === 'local'
? undefined
: credentials.createSsl(),
protoPath: [
ConnectorManager.ProtoPaths.WriteFilePath,
ConnectorManager.ProtoPaths.ReadFilePath,
+4 -1
View File
@@ -17,7 +17,10 @@ export class DucClient {
options: {
url: process.env.DUC_URL,
package: ProtoPackages.WritePackage,
credentials: process.env.LOCAL_ENV ? undefined : credentials.createSsl(),
credentials:
process.env.LOCAL_ENV || process.env.ENV === 'local'
? undefined
: credentials.createSsl(),
protoPath: ProtoPaths.WriteFilePath,
loader: {
keepCase: true,
+4 -1
View File
@@ -16,7 +16,10 @@ export class InputsGrpcClient {
Input.ProtoPackages.WritePackage,
Input.ProtoPackages.ReadPackage,
],
credentials: process.env.LOCAL_ENV ? undefined : credentials.createSsl(),
credentials:
process.env.LOCAL_ENV || process.env.ENV === 'local'
? undefined
: credentials.createSsl(),
protoPath: [
Input.ProtoPaths.WriteFilePath,
Input.ProtoPaths.ReadFilePath,
@@ -57,7 +57,7 @@ export class PermissionsService
}).catch((err: ErrorBuilder) => {
if (
err.code === 'No connection established' &&
process.env.LOCAL_ENV === 'true'
(process.env.LOCAL_ENV === 'true' || process.env.ENV === 'local')
) {
return this.logger.info(
"couldn't connect to DUC. suppresing in local env",
+4 -1
View File
@@ -13,7 +13,10 @@ export class PipelinesClientConfiguration {
options: {
url: process.env.PIFACTORY_URL,
package: PipelinePackages,
credentials: process.env.LOCAL_ENV ? undefined : credentials.createSsl(),
credentials:
process.env.LOCAL_ENV || process.env.ENV === 'local'
? undefined
: credentials.createSsl(),
protoPath: PipelineProtoFilePath,
loader: {
enums: String,
@@ -13,7 +13,10 @@ export class TransformationsClientConfiguration {
options: {
url: process.env.INFACTORY_URL,
package: [Transformation.ProtoPackages.WritePackage],
credentials: process.env.LOCAL_ENV ? undefined : credentials.createSsl(),
credentials:
process.env.LOCAL_ENV || process.env.ENV === 'local'
? undefined
: credentials.createSsl(),
protoPath: [Transformation.ProtoPaths.WriteFilePath],
loader: {
enums: String,