VOOZH about

URL: https://deepwiki.com/Accenture/Ocaramba/5-cicd-pipelines

⇱ CI/CD Pipelines | Accenture/Ocaramba | DeepWiki


Loading...
Last indexed: 6 June 2026 (fb3580)
Menu

CI/CD Pipelines

The Ocaramba framework utilizes a robust CI/CD architecture designed to validate the framework across multiple operating systems (Windows, Linux), browser engines, and execution environments (Docker, Selenium Grid, Cloud Providers). This is achieved through two primary orchestration systems—GitHub Actions and Azure Pipelines—which both leverage a shared layer of PowerShell orchestration scripts to maintain consistency in test execution and configuration injection.

Pipeline Architecture Overview

The CI/CD strategy is split into three distinct stages: Build, Test, and Release. The "Test" stage is highly parallelized, often splitting test suites across multiple runners to reduce execution time.

CI/CD Logic Flow


Sources: .github/workflows/github-actions.yml28-117 azure-pipelines.yml36-132 scripts/ExecutingTestsOnWindowsGithubActions4.ps11-16 scripts/ExecutingTestsOnLinuxBrowserStackGithubActions.ps11-17


GitHub Actions Workflow

The GitHub Actions workflow is the primary CI system for the repository. It handles the full lifecycle from code push to NuGet publishing and documentation hosting.

  • Triggers: The pipeline triggers on pushes to all branches, pull requests, weekly schedules, and version tags <FileRef file-url="https://github.com/Accenture/Ocaramba/blob/fb3580ab/.github/workflows/github-actions.yml#L1-L12" min=1 max=12 file-path=".github/workflows/github-actions.yml">Hii</FileRef>.
  • Build Stage: Performed on windows-latest. It restores dependencies for OcarambaLite, Ocaramba, and the documentation project <FileRef file-url="https://github.com/Accenture/Ocaramba/blob/fb3580ab/.github/workflows/github-actions.yml#L64-L68" min=64 max=68 file-path=".github/workflows/github-actions.yml">Hii</FileRef>. It updates project versions using frameworkVersion <FileRef file-url="https://github.com/Accenture/Ocaramba/blob/fb3580ab/.github/workflows/github-actions.yml#L76-L83" min=76 max=83 file-path=".github/workflows/github-actions.yml">Hii</FileRef>, builds the core libraries, and generates SHFB documentation <FileRef file-url="https://github.com/Accenture/Ocaramba/blob/fb3580ab/.github/workflows/github-actions.yml#L89-L94" min=89 max=94 file-path=".github/workflows/github-actions.yml">Hii</FileRef>.
  • Solution Pruning: To optimize build times, the workflow uses a PowerShell regex-based switch to remove specific test sub-projects (e.g., Ocaramba.Tests.Appium, Ocaramba.Tests.NUnit) from Ocaramba.sln during the build stage <FileRef file-url="https://github.com/Accenture/Ocaramba/blob/fb3580ab/.github/workflows/github-actions.yml#L44-L63" min=44 max=63 file-path=".github/workflows/github-actions.yml">Hii</FileRef>.
  • Test Stages: Tests are executed in parallel across various environments:
    • Docker: Builds the ocaramba/selenium image, starts services via docker-compose, and runs ExecutingTestsOnDockerGithubActions.ps1 <FileRef file-url="https://github.com/Accenture/Ocaramba/blob/fb3580ab/.github/workflows/github-actions.yml#L117-L157" min=117 max=157 file-path=".github/workflows/github-actions.yml">Hii</FileRef>.
    • Windows: Multiple jobs (Windows1-6) run different subsets of the test projects.
    • Cloud/Mobile: Specific stages for BrowserStack using the dotnet browserstack-sdk <FileRef file-url="https://github.com/Accenture/Ocaramba/blob/fb3580ab/scripts/ExecutingTestsOnWindowsGithubActions4.ps1#L6-L6" min=6 file-path="scripts/ExecutingTestsOnWindowsGithubActions4.ps1">Hii</FileRef> and Appium Android emulators.
  • Release Stage: Publishes .nupkg and .snupkg artifacts for both Ocaramba and OcarambaLite <FileRef file-url="https://github.com/Accenture/Ocaramba/blob/fb3580ab/.github/workflows/github-actions.yml#L101-L116" min=101 max=116 file-path=".github/workflows/github-actions.yml">Hii</FileRef>.

For details, see GitHub Actions Workflow.


Azure Pipelines Workflow

The Azure Pipelines configuration provides a mirrored CI environment, focusing on multi-framework support and Azure DevOps integration.

  • Variable Management: Centralizes versioning via the frameworkVersion variable (defaulting to 4.0.0) and manages Selenium Grid versions and URLs <FileRef file-url="https://github.com/Accenture/Ocaramba/blob/fb3580ab/azure-pipelines.yml#L26-L34" min=26 max=34 file-path="azure-pipelines.yml">Hii</FileRef>.
  • Build Job: Uses VSBuild@1 <FileRef file-url="https://github.com/Accenture/Ocaramba/blob/fb3580ab/azure-pipelines.yml#L90-L96" min=90 max=96 file-path="azure-pipelines.yml">Hii</FileRef> after performing a solution pruning step similar to GitHub Actions to remove the Documentation project <FileRef file-url="https://github.com/Accenture/Ocaramba/blob/fb3580ab/azure-pipelines.yml#L53-L56" min=53 max=56 file-path="azure-pipelines.yml">Hii</FileRef>.
  • Artifacts: Publishes build results and NuGet packages as Pipeline Artifacts using PublishPipelineArtifact@1 <FileRef file-url="https://github.com/Accenture/Ocaramba/blob/fb3580ab/azure-pipelines.yml#L97-L127" min=97 max=127 file-path="azure-pipelines.yml">Hii</FileRef>.
  • Test Stage: Runs parallel jobs for Docker, Linux, and Cloud providers. The Linux job sets the ASPNETCORE_ENVIRONMENT=Linux environment variable <FileRef file-url="https://github.com/Accenture/Ocaramba/blob/fb3580ab/azure-pipelines.yml#L170-L172" min=170 max=172 file-path="azure-pipelines.yml">Hii</FileRef>.

For details, see Azure Pipelines Workflow.


PowerShell Orchestration Scripts

To prevent duplication of logic between GitHub Actions and Azure Pipelines, the framework uses a suite of PowerShell scripts located in the /scripts directory.

Key Script Responsibilities

ScriptPurposeKey Code Entity
set_AppConfig_for_tests.ps1Injects environment-specific values into appsettings.json or XML configs.Microsoft.Extensions.Configuration
ExecutingTestsOnWindows*.ps1Orchestrates dotnet vstest or dotnet browserstack-sdk calls.dotnet browserstack-sdk
ExecutingTestsOnDocker*.ps1Manages test execution inside containers.ExecutingTestsOnDockerGithubActions.ps1
ExecutingTestsOnLinux*.ps1Sets ASPNETCORE_ENVIRONMENT=Linux and triggers tests.$Env:ASPNETCORE_ENVIRONMENT

Script Interaction Diagram


For details, see PowerShell Test Orchestration Scripts.


Configuration Injection

A critical part of the pipeline is the ability to change test parameters (like browser type or hub URL) without modifying source code. The CI pipelines call set_AppConfig_for_tests.ps1 to dynamically modify the appsettings.json files in the build output directories before the test runner starts.

Example usage for Linux environments: The script ExecutingTestsOnLinuxBrowserStackGithubActions.ps1 explicitly sets the environment to Linux <FileRef file-url="https://github.com/Accenture/Ocaramba/blob/fb3580ab/scripts/ExecutingTestsOnLinuxBrowserStackGithubActions.ps1#L4-L6" min=4 max=6 file-path="scripts/ExecutingTestsOnLinuxBrowserStackGithubActions.ps1">Hii</FileRef> before invoking the test runner to ensure the correct appsettings.Linux.json overrides are applied by the framework's BaseConfiguration.

Sources: .github/workflows/github-actions.yml44-63 azure-pipelines.yml53-56 scripts/ExecutingTestsOnWindowsGithubActions4.ps14-9 scripts/ExecutingTestsOnLinuxBrowserStackGithubActions.ps14-11