-
Notifications
You must be signed in to change notification settings - Fork 9
Release Process
See also: TAE Release Process video.
Announce a code freeze and start QA process. At this time, no new code should be merged other that what is needed to address blockers identified during QA and things needed for the release process itself. QA can be performed against the dev site.
Once QA has completed and all blockers for the release addressed, the release process can continue.
Make sure that all of the issues for the current milestone have been completed. If there are any open issues, either complete them or move to another milestone as needed. Once all of the issues for the milestone have been completed, close the milestone.
Make sure that all translations have been synced to the repository.
- Go CrowdIn (requires an account with access to the TAE project)
- Go to Integrations > GitHub
- Click "Sync Now" to force sync any changes from CrowdIn to the GitHub repository
If there are any changes, in a few minutes a branch with the changes will be pushed to the repo and an PR generated against the dev
branch with the changes. This will need to be merged into the GitHub repo.
This project uses Release Please to automate the release and tagging process. As changes are merged into the dev
branch, Release Please maintains a PR for the upcoming release. Release Please bumps the version number in composer.json
and will take care of generating the release notes, the GitHub release, and Git tag. All of those steps will be completed when the release PR is merged into the dev
branch.
The version number uses SemVer and will automatically be bumped based on the commit prefixes. See: "How should I write my commits" for more information.
NOTE: The Publish Release
GitHub action can be triggered manually from the Actions page. This may be useful if you need to modify a release notes (see: "How can I fix release notes?").
After a release has been published, it will automatically trigger the release tag to be merged into the staging
branch.
For releasing to production
, or if the release isn't automatically merged into staging
, you can trigger the "Merge Release" workflow manually.
- Go to the Actions tab in the GitHub Repository
- Select the Merge Release workflow from the left navigation.
- Expand the "Run workflow" drop down
- Set the branch (
staging
orproduction
) to merge into and the release tag to merge (you can find this from the release page) - Activate the "Run workflow" button
After the release has been merged:
- On GitHub, the respective branch will display the GitHub action for mirroring the staging branch from GitHub to the hosted GitLab instance.
- Once the GitLab instance has been updated, it will trigger a CI/CD job to deploy to Kubernetes. (requires access to see).
- Once deployed to Kubernetes it will take about several minutes for the pods to be redeployed. (requires access to see).
Typically you'll release to staging first and test out the changes before releasing to production.
NOTE: Special access is required to see the status of the GitLab pipeline and Kubernetes deployment.
NOTE: If the deployment fails, may need to check the Kubernetes deployment and/or talk to CoLab (the site host) to investigate. Some deployment failures may be related to dependency changes, file permissions, caching, or database.
If the "Merge Release" workflow does not work, or you prefer to manually release, you can use git commands in a terminal to perform the merging locally and then push up to GitHub.
Locally merge the tagged version into the branch (staging
or production
) and push up to GitHub; ensure your local branches are clean and up-to-date with the GitHub repo before merging.
-
Checkout out the branch locally
git checkout {branch name}
-
Fetch from the project's GitHub repo remote. Likely origin or upstream
git fetch {remote name}
-
Ensure there are no changes in your local branch that aren't present in the project's GitHub branch
git log {branch name} ^{remote name}/{branch name}
-
Merge your local branch with the project's GitHub branch to make sure they are in sync
git merge {remote name}/{branch name}
-
Merge in the release tag
git merge {tag name}
-
Push the merged changes back up to GitHub. If you have a GitHub fork you can push there first to verify the changes.
git push {remote name} {branch name}
NOTE: This is the typical migrations that will be run on staging and production deployments. These should be done automatically as part of the deploy, but can be run manually if needed.
- Login into Kubernetes cloud dashboard
- Open one of the application pods
- Exec into the pod to get access to a shell
- Put the site into maintenance mode
php artisan down
- Update the migrations,
php artisan migrate
- Restore the staging site from maintenance mode
php artisan up
NOTE: This is only required if the dev or staging database needs to be wiped, and/or updated/replaced by data from seeders
This is typically only going to be needed for the dev or staging deployment.
- Login into Kubernetes cloud dashboard for staging
- Open one of the application pods
- Exec into the pod to get access to a shell
- Put the site into maintenance mode
php artisan down
- Update the migrations, clear the database, and run the production seeder
php artisan migrate:fresh
- for the dev site, can use the DevSeeder.
php artisan migrate:fresh --seeder DevSeeder
- for the dev site, can use the DevSeeder.
- Restore the site from maintenance mode
php artisan up
NOTE: This is not a typical action but may be needed if there are a large number of changes to a relatively static table. It should be avoided where possible and cannot be used if anything depends on the IDs.
- Backup database as needed
- Log into PhpMyAdmin
- Go to the database
- Go to the Export tab
- Export the database as needed.
- Login into Kubernetes cloud dashboard for the deployment
- Open one of the application pods
- Exec into the pod to get access to a shell
- Put the site into maintenance mode
php artisan down
- Truncate the table to be re-seeded
- Launch tinker to run Laravel application commands to truncate the table;
php artisan tinker
- Run
{ModelName}::truncate();
where{ModelName}
should be replaced by the name of the model for whose table needs to be truncated. For example to truncate theinterpretations
table runInterpretation::truncate();
- Exit tinker; run
exit
- Launch tinker to run Laravel application commands to truncate the table;
- Re-seed the database table
- Run
php artisan db:seed --class={SeederName}
where{SeederName}
is replaced by the name of the Seeder to run. This seeder must be specific to the table that needs to be re-seeded and not one that affects any other table.
- Run
- Verify the database is correct. If it isn't, restore the database from the backup.
- Restore the site from maintenance mode
php artisan up
For the production site this should not be needed after the initial "production" release unless new accounts are required. For the staging, this is only needed if the previous step was performed and the database wiped.
- Login into Kubernetes cloud dashboard for staging
- Open one of the application pods
- Exec into the pod to get access to a shell
- Launch tinker to run Laravel application commands to create the account(s);
php artisan tinker
- Create the account for example:
User::factory()->create(['email' => '[email protected]', 'name' => 'User Name', 'context' => 'administrator'])
. This user will need to reset their password immediately by using the forgot password flow from the staging site.
After the site is updated, run through the release test plans (see below) and verify that paths through the system are functioning as expected. Any blocker issues must be addressed immediately.
- Testing for Community Organization flows
- Testing for Regulated Organization flows
- Testing for Individual flows
- Testing for Training Participant flows
Now that the release has been completed successfully, the repository can again receives merges of new code changes.