Documentation : "Updating PHP dependencies on Tajine software" + "Launch test suite
table of contents
- Launch test suite (WIP)
- Updating PHP dependencies on Tajine software
- Additional tasks after a new release
Launch test suite (WIP)
Prerequisites
- PHP 8.1
- Composer
-
PHP extensions
-
php8.1-intl
- ...
-
Updating PHP dependencies on Tajine software
Prerequisites (Ubuntu 24.04)
- PHP 8.1
- Composer
- Composer-Changelogs
-
PHP extensions
-
php8.1-intl
-
PHP 8.1
PHP 8.1 installation procedure
# Install PPA that allows multiple versions of PHP to be used on your computer
sudo add-apt-repository ppa:ondrej/php -y
sudo apt update
# Install PHP 8.1 (PHP version used on our production servers)
sudo apt install php8.1
# Set PHP 8.1 as the default PHP version
php -v
sudo update-alternatives --config php
PHP extensions
sudo apt install php8.1-intl
Composer
see: https://getcomposer.org/download/
Composer-Changelogs
see: https://github.com/pyrech/composer-changelogs/
# Install Composer-Changelogs globally
composer global require "pyrech/composer-changelogs"
Updating PHP dependencies and create a new release
Updating PHP dependencies
- Create a new issue. Example: chore(composer.lock): update symfony (v6.4.18 =... (#129 - closed)
- Updating PHP dependencies (Option 1)
- Create a MR (merge request) associated with previously created issue.
- Updating PHP dependencies with composer.
- Save changes in a commit like this one: 8a8763a3
- Merge MR when CI is green.
- Updating PHP dependencies (Option 2)
- Updating PHP dependencies with composer.
- Run test suite and make sure all tests pass correctly.
- Save changes in a commit like this one: 8a8763a3
- Push changes to
main
branch. - Close previously created issue and add a link to the commit as a comment.
git clone git@gitlab.adullact.net/adullact/pki/tajine.git
cd tajine
# Updating PHP dependencies on Tajine software
make composer_update
Create a new release
- Update CHANGELOG file.
- Push changes to
main
branch. - If CI has no errors on the
main
branch, then create a version tag. - If CI contains no errors on the previously created tag, then create a Gitlab release.
- add CHANGELOG of this new version in description.
- add package link of this new version
Additional tasks after a new release
Update staging and production servers
See dedicated private documentation.
Update demo Vagrant VM (optional)
See the dedicated repository: https://gitlab.adullact.net/adullact/pki/vagrant-tajine
Update Puppet configuration.
Example: vagrant-tajine@9a67161f
Run Vagrant VM to check that the new version works
See: Prerequisites
git clone git@gitlab.adullact.net:adullact/pki/vagrant-tajine.git
cd vagrant-tajine
# Download all required Puppet modules used to configure the virtual machine
./BUILD.sh
# Creates and starts the VM (Virtual Machine) according to the Vagrantfile
vagrant destroy -f # stops the running machine Vagrant and destroys all resources
vagrant up # Then you wait few minutes
# depends on your network access and power of your computer
#################################################
# - In your browser, go to http://127.0.0.1:8002/
# - Use this following user and password to login:
# - admin-tajine@example.org
# - admin-tajine_PaSsWord_IsNotSoSecretChangeIt
#
# Browsing e-mails sent by Tajine software in webmail:
# - In your browser, go to http://127.0.0.1:8025/
#################################################
# Stops gracefully the VM
vagrant halt
Creation of a new Vagrant VM release
- Update CHANGELOG. Example: vagrant-tajine@ea2c7521
- Push changes to
main
branch. - If CI has no errors on the
main
branch, then create a version tag. - If CI contains no errors on the previously created tag, then create a Gitlab release.
- add CHANGELOG of this new version in description.
- add package link of this new version