Update flow for deleting deployments
All checks were successful
Lint / lint (20.x) (pull_request) Successful in 4m35s
All checks were successful
Lint / lint (20.x) (pull_request) Successful in 4m35s
This commit is contained in:
parent
b50efe315b
commit
b409d43e51
@ -716,7 +716,7 @@ export class Service {
|
|||||||
const environmentVariablesObj = await this.getEnvVariables(data.project!.id!);
|
const environmentVariablesObj = await this.getEnvVariables(data.project!.id!);
|
||||||
|
|
||||||
// If a custom domain is present then use that as the DNS in the deployment request
|
// If a custom domain is present then use that as the DNS in the deployment request
|
||||||
const domain = await this.db.getOldestDomainByProjectId(data.project!.id!);
|
const customDomain = await this.db.getOldestDomainByProjectId(data.project!.id!);
|
||||||
|
|
||||||
// To set project DNS
|
// To set project DNS
|
||||||
if (data.environment === Environment.Production) {
|
if (data.environment === Environment.Production) {
|
||||||
@ -728,7 +728,7 @@ export class Service {
|
|||||||
appName: repo,
|
appName: repo,
|
||||||
repository: repoUrl,
|
repository: repoUrl,
|
||||||
environmentVariables: environmentVariablesObj,
|
environmentVariables: environmentVariablesObj,
|
||||||
dns: domain?.name ?? `${dnsDeployment.project.name}`,
|
dns: customDomain?.name ?? `${dnsDeployment.project.name}`,
|
||||||
lrn: deployer!.deployerLrn!,
|
lrn: deployer!.deployerLrn!,
|
||||||
apiUrl: deployer!.deployerApiUrl!,
|
apiUrl: deployer!.deployerApiUrl!,
|
||||||
payment: data.project.txHash,
|
payment: data.project.txHash,
|
||||||
@ -1280,11 +1280,20 @@ export class Service {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
await this.laconicRegistry.createApplicationDeploymentRemovalRequest({
|
const dnsResult =
|
||||||
deploymentId: dnsDeployment.applicationDeploymentRecordId!,
|
await this.laconicRegistry.createApplicationDeploymentRemovalRequest({
|
||||||
deployerLrn: dnsDeployment.deployer.deployerLrn,
|
deploymentId: dnsDeployment.applicationDeploymentRecordId!,
|
||||||
auctionId: dnsDeployment.project.auctionId,
|
deployerLrn: dnsDeployment.deployer.deployerLrn,
|
||||||
payment: dnsDeployment.project.txHash
|
auctionId: dnsDeployment.project.auctionId,
|
||||||
|
payment: dnsDeployment.project.txHash
|
||||||
|
});
|
||||||
|
|
||||||
|
await this.db.updateDeploymentById(dnsDeployment.id, {
|
||||||
|
status: DeploymentStatus.Deleting,
|
||||||
|
applicationDeploymentRemovalRequestId:
|
||||||
|
dnsResult.applicationDeploymentRemovalRequestId,
|
||||||
|
applicationDeploymentRemovalRequestData:
|
||||||
|
dnsResult.applicationDeploymentRemovalRequestData,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user