CI pipelines test fresh Drupal install from config but does not test Drupal update deployments like they will eventually happen
It makes it easy to miss required hookupdates and only notice it when deployment to client env fails
Expected :
It should be possible to simulate Drupal update deployments right in CI to identify potential deployment issues before they arise
How does it work :
By convention, a git tag is always created when a deployment to client env happens
Tag creation now gives birth to a review app, whose time to live is arbitrarily set to a few hours only. It's main purpose is actually to generate and archive artifacts: Drupal database and Drupal files, post install
Once artifacts archive is generated, it can be downloaded to a running review app, whose db and files are replaced by those from the artifacts. At that very moment, the review app is kind of rolled-back to the state of said tag, but with config and hookupdate awaiting to be imported and run
Then only remains to execute drush deploy to simulate the deployment of current branch against last tag deployed, and debug, at the earliest, any issue arising
Screenshots :
build:tag job
test:deploy job
Possible future improvements :
Host artifacts archive somewhere else instead of Gitlab
User could define a specific tag to test against instead of using the very last tag created as currently
Current :
Expected :
How does it work :
drush deploy
to simulate the deployment of current branch against last tag deployed, and debug, at the earliest, any issue arisingScreenshots :
Possible future improvements :