(rollbackId: string)
| 170 | }; |
| 171 | |
| 172 | export const rollback = async (rollbackId: string) => { |
| 173 | const result = await findRollbackById(rollbackId); |
| 174 | |
| 175 | const deployment = await findDeploymentById(result.deploymentId); |
| 176 | |
| 177 | if (!deployment?.applicationId) { |
| 178 | throw new Error("Deployment not found"); |
| 179 | } |
| 180 | |
| 181 | const application = await findApplicationById(deployment.applicationId); |
| 182 | |
| 183 | if (!result.fullContext) { |
| 184 | throw new Error("Rollback context not found"); |
| 185 | } |
| 186 | await rollbackApplication( |
| 187 | application.appName, |
| 188 | result.image || "", |
| 189 | application.serverId, |
| 190 | result.fullContext, |
| 191 | ); |
| 192 | }; |
| 193 | |
| 194 | const dockerLoginForRegistry = async ( |
| 195 | registry: Registry, |
no test coverage detected