Deploys and releases

Deploy to production

Once a task is assigned the FOR DEPLOY status, it is ready to be published on the production websites. This is done by the Lead Technical Writer or an team member who performs the duties of the Lead Technical Writer by merging the develop branch to master.

This is a regular and easy procedure, but it has a few tricky points that you should keep in mind:

  • Release tasks are deployed according to the specified Due date. The release process is described below on this page.

  • Other tasks from the same project can be already merged to develop but still remain in the WAITING FOR APPROVAL status. If you now merge develop to master, this yet-unapproved stuff will also be deployed to the production website. So, you either create a separate branch where you delete or comment unapproved information and then merge this branch to master, or (better, if there is no emergency) just wait until all the tasks are approved and then deploy them altogether.

To deploy, run the following commands in your terminal:

Important

The Allowed to merge permission for the master branch is required. During the Lead Technical Writer’s absence, access is temporarily granted to a responsible team member.

  1. Navigate to the required directory: cd <project name>.

  2. Switch to the develop branch: git checkout develop.

  3. Pull the updates: git pull.

  4. Switch to the master branch: git checkout master.

  5. Merge updates from develop to master: git merge develop. Once/If Vim is open, type :wq, then press Enter.

  6. Push updates to master: git push.

After that, a job is automatically started. Monitor the process on the CI/CD > Pipelines in GitLab. Both stages (build and deploy) should pass successfully.

Do not forget to move all deployed tasks to DONE after deployment is complete.

Release

Prerequisites

For smooth releases, make use of the following check list:

  • Release notes are ready and approved.

  • The documentation is updated, all merge requests are reviewed and merged.

  • The develop branch is updated.

  • The project repository is cloned to your computer.

Release procedure

Step 1. Create a release branch

In the terminal, execute the following commands (make sure you are in the correct project directory):

git checkout develop

git pull

git checkout -b release/yyyy-mm-dd    // yyyy-mm-dd should be the actual release date

Step 2. Update the release branch

  1. In the conf.py file, update the release date in the release field. Save the changes.

  2. To the release-notes.rst file, copy-paste the text of the new release notes and format it according to the template. Save the changes.

  3. Build the documentation locally to make sure that everything is compiled without warnings.

  4. In the terminal, execute the following commands:

git status

git add .

git status

git commit -m "Release yyyy-mm-dd"     // yyyy-mm-dd should be the actual release date

Step 3. Merge the release branch to the master branch

  1. In the terminal, execute the following commands:

git checkout master

git pull

git merge release/yyyy-mm-dd      // yyyy-mm-dd should be the actual release date

git push

At this step, you usually see a Vim window. Type :wq and press Enter to quit.

Note

If conflicts arise when trying to merge, first resolve them TBD, then execute the following commands:

git status

git add .

git commit -m “Release yyyy-mm-dd”     // yyyy-mm-dd should be the actual release date

git push

Next, navigate to the following step. You don’t need to merge the branch once again.

  1. In the CI/CD section in GitLab, make sure that the build and deploy stages are passed successfully.

Step 4. Merge the release branch to the develop branch

This process is the same as for Step 3. The only difference is that all the actions are performed in the develop branch. The notes to Step 3 may also apply to this step.

  1. In the terminal, execute the following commands:

git checkout develop

git pull

git merge release/yyyy-mm-dd       // yyyy-mm-dd should be the actual release date

git push
  1. In the CI/CD section in GitLab, make sure that the build and deploy stages are passed successfully.

Step 5. Create a tag

  1. Navigate to the Project overview section in GitLab and select Tags.

  2. Click New tag and fill out the following:

  • Tag name — release date in the YYYY-MM-DD format

  • Create from — it is crucial that you select the master branch!

  • Release notes — the link to release notes on the production website (you can copy it from the address bar of your browser because the production website is already updated). It’s important to fill in this field, because if you leave it blank, GitLab won’t consider it a release!

  1. Click Create tag.

  2. Check the release notification in the Slack channel.


#advanced