How to perform a SGI release

Version Date Notes By
0.1 2017-04-12 Initial release FPA

Introduction

In order to perform a SGI release there are some steps that need to be taken:

  1. Merge development branch(es) into master branch(es)
  2. Tag master branch(es) with a new, unique, version
  3. Update satis repository
  4. Release into the target environment

1. Merge development branch(es) into master branch(es)

In first place we need to merge de development branches of the modules we want to release into the corresponding master branches. In order to do that we can use the SourceTree git client.

  1. Double click to checkout and change to master branch

  2. Click merge button

  3. Select the line corresponding to the commit we want to merge into the master branch, usually it will be first (top) line.

  4. Click OK button in order to perform the merge

  5. Click "Push" button placed in actions bar

  6. On Push dialog, certify that the master branch is selected on both the local and remote branches (it is by default), and click the "Push" button

  7. Repeat the steps above to all the modules you want to release/update, both on backend and frontend modules.

At this point, the frontend modules aren't separated from each others like it happens with backend modules. That means we need to perform these steps for all the backend modules. Be aware to certify that all code you are merging into master branch is runnable and do not breaks.

2. Tag master branch(es) with a new, unique, version

  1. Click "Tag" button placed in actions bar
  2. Write the desired tag version
  3. Check "Push tag" to "origin"
  4. Click "Add Tag" button in order to submit

3. Update satis repository

  1. Navigate to Satis gitlab repository pipelines page
  2. Click in "Run Pipeline" button, in order to execute the pipeline that rebuilds satis repository

4. Release into the target environment

Assuming the environment is already installed, and you only want to update/release a new version, follow the steps bellow.

Backend

  1. Stop laravel-echo-server and queue:work services, if applicable.
  2. Positionate yourself within the backend's root folder
  3. php artisan down
  4. git checkout composer.json composer.lock
  5. git pull
  6. composer install
  7. composer require wemake/sgi-xxxxx to reinstall the desired modules. Replace "xxxxx" with the module slug (you can indicate as many modules as you want in same require)
  8. php artisan migrate
  9. php artisan reseed
  10. php artisan clear-a
  11. Start laravel-echo-server and queue:work services, if applicable.