Update method to rollback to previous version
All checks were successful
Lint / lint (20.x) (pull_request) Successful in 4m38s
All checks were successful
Lint / lint (20.x) (pull_request) Successful in 4m38s
This commit is contained in:
parent
720411d5d2
commit
21334df4cb
@ -695,8 +695,8 @@ export class Service {
|
||||
// If a custom domain is present then use that as the DNS in the deployment request
|
||||
const customDomain = await this.db.getOldestDomainByProjectId(data.project!.id!);
|
||||
|
||||
// On deleting deployment later, project DNS deployment is also deleted
|
||||
// So publish project DNS deployment first so that ApplicationDeploymentRecord for the same is available when deleting deployment later
|
||||
// On deleting deployment later, project canonical deployment is also deleted
|
||||
// So publish project canonical deployment first so that ApplicationDeploymentRecord for the same is available when deleting deployment later
|
||||
const { applicationDeploymentRequestData, applicationDeploymentRequestId } =
|
||||
await this.laconicRegistry.createApplicationDeploymentRequest({
|
||||
deployment: canonicalDeployment,
|
||||
@ -791,8 +791,8 @@ export class Service {
|
||||
// If a custom domain is present then use that as the DNS in the deployment request
|
||||
const customDomain = await this.db.getOldestDomainByProjectId(project!.id!);
|
||||
|
||||
// On deleting deployment later, project DNS deployment is also deleted
|
||||
// So publish project DNS deployment first so that ApplicationDeploymentRecord for the same is available when deleting deployment later
|
||||
// On deleting deployment later, project canonical deployment is also deleted
|
||||
// So publish project canonical deployment first so that ApplicationDeploymentRecord for the same is available when deleting deployment later
|
||||
const { applicationDeploymentRequestId, applicationDeploymentRequestData } =
|
||||
await this.laconicRegistry.createApplicationDeploymentRequest({
|
||||
deployment: canonicalDeployment,
|
||||
@ -1218,6 +1218,10 @@ export class Service {
|
||||
{ isCurrent: true },
|
||||
);
|
||||
|
||||
if (!newCurrentDeploymentUpdate || !oldCurrentDeploymentUpdate){
|
||||
return false;
|
||||
}
|
||||
|
||||
const newCurrentDeployment = await this.db.getDeployment({ where: { id: deploymentId }, relations: { project: true, deployer: true } });
|
||||
|
||||
if (!newCurrentDeployment) {
|
||||
@ -1255,12 +1259,12 @@ export class Service {
|
||||
|
||||
log(`Application deployment request record published: ${result.id}`)
|
||||
|
||||
await this.db.updateDeploymentById(canonicalDeployment.id, {
|
||||
const updateResult = await this.db.updateDeploymentById(canonicalDeployment.id, {
|
||||
applicationDeploymentRequestId: result.id,
|
||||
applicationDeploymentRequestData,
|
||||
});
|
||||
|
||||
return newCurrentDeploymentUpdate && oldCurrentDeploymentUpdate;
|
||||
return updateResult;
|
||||
}
|
||||
|
||||
async deleteDeployment(deploymentId: string): Promise<boolean> {
|
||||
|
Loading…
Reference in New Issue
Block a user