Rollback in case of failed Deployment
If a Deployment replaced a old Version and this Deployment failed, the old Version should be roll backed.
Process:
- Check if hostname already exists, if yes => set BlueGreenDeployment = true
- If BlueGreenDeployment == true => Rename existing container
- Pull new Image
- Create new Container
- If 3 or 4 failed => rename old container back and stop process
- If BlueGreenDeployment == true => Stop old container
- Start new Container
- If 6 failed => restart old container and rename old container back.
- BlueGreenDeployment = true => Remove old Container
Edited by Benny