Skip to content

Platform Tools Release Guideline

Platform tools are critical components developed by the Hubtel Mobile platform team, encompassing various libraries, packages, and utilities such as UI/UX components, storage functions, infinite scroll components, data formatting utilities, payment checkout packages, and more.

Given the central role of platform tools in Hubtel's products, it's imperative to ensure they are thoroughly tested to mitigate errors, security concerns, and breaches. To achieve this, the following guidelines are established:

  1. Test Coverage: All features within platform tools packages must be accompanied by comprehensive tests to validate functionality and prevent regressions.

  2. Example Projects: For UI components and libraries, example projects should be provided to facilitate testing and showcase usage scenarios. These examples serve as reference implementations and aid in understanding the intended behavior of the components.

  3. Automated Testing: Tests should be automated and integrated into the build pipeline. Before merging new features into the main branch, these tests are executed in the build pipeline to ensure that changes do not introduce regressions or errors.

  4. Continuous Integration (CI): Continuous integration practices should be employed, wherein code changes are regularly integrated into a shared repository, and automated builds and tests are triggered upon each integration. This ensures early detection of issues and maintains code stability.

  5. Tagging: Tags should be applied to releases in the version control system. Consumers of the packages or libraries should reference these tags rather than branches to ensure stability and compatibility.

Diagram illustrating the testing and release process

Pipeline Template

To implement the workflow outlined above, we will create a dedicated pipeline template. This template will include stages and tasks necessary for testing, building, and releasing platform tools. Additionally, we will configure Azure to enforce code merging only if the pipeline tests and builds pass. For example:

yaml
stages:
  - name: Test
    jobs:
      - template: platform-tools-test.yml  # Template for testing platform tools
  - name: Build
    jobs:
      - template: platform-tools-build.yml  # Template for building platform tools
  - name: Release
    jobs:
      - template: platform-tools-release.yml  # Template for releasing platform tools

Configuration on Azure

  • Pipeline Integration: Integrate the pipeline template into your project's Azure DevOps repository. Ensure that the necessary pipeline configurations are correctly set up, including triggers, variables, and repository connections.

  • Pipeline Tests and Builds: Configure the pipeline to run automated tests and builds for platform tools upon each code change or pull request to the main branch. This ensures that any changes undergo thorough testing and validation before being merged into the main branch.

  • Branch Protection Rules: Set up branch protection rules in Azure to enforce that code changes can only be merged into the main branch if the pipeline tests and builds pass successfully. This prevents the introduction of errors or regressions into the main codebase.

  • Tagging Releases: Configure the pipeline to automatically tag releases in the version control system upon successful completion of the release stage. This ensures that consumers can reference stable releases using tags rather than branches.