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 theWAITING FOR APPROVAL
status. If you now mergedevelop
tomaster
, 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 tomaster
, 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.
Navigate to the required directory:
cd <project name>
.Switch to the
develop
branch:git checkout develop
.Pull the updates:
git pull
.Switch to the
master
branch:git checkout master
.Merge updates from
develop
tomaster
:git merge develop
. Once/If Vim is open, type:wq
, then press Enter.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
In the
conf.py
file, update the release date in the release field. Save the changes.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.Build the documentation locally to make sure that everything is compiled without warnings.
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
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.
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.
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
In the CI/CD section in GitLab, make sure that the build and deploy stages are passed successfully.
Step 5. Create a tag
Navigate to the Project overview section in GitLab and select Tags.
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!
Click Create tag.
Check the release notification in the Slack channel.
#advanced