-
Notifications
You must be signed in to change notification settings - Fork 10
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 bump the version number 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?").
-
Locally merge the tagged version into the staging branch and push up to GitHub; ensure your local branches are clean and up-to-date with the GitHub repo before merging.
# Change to your local staging branch git checkout staging # Fetch from the GitHub repo; assumes your remote is named upstream. git fetch upstream # Ensure there are no changes in your local staging branch that aren't present in the GitHub staging branch git log staging ^upstream/staging # Merge your local staging with upstream to make sure they are in sync git merge upstream/staging # Merge in the tag (replace the {tag name} with the tag you just created 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 upstream staging
NOTE: An alternative would be to create a PR from
dev
tostaging
andproduction
in GitHub and merge the PR. -
On GitHub, the staging 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).
-
If the staging site deployment is working properly, repeat the above steps for the
production branch
as needed.
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.
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@example.com', '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.