VOOZH about

URL: https://deepwiki.com/Accenture/Ocaramba/5.2-azure-pipelines-workflow

⇱ Azure Pipelines Workflow | Accenture/Ocaramba | DeepWiki


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

Azure Pipelines Workflow

The Azure Pipelines workflow for Ocaramba is defined in the azure-pipelines.yml file. It implements a robust CI/CD strategy consisting of a three-stage pipeline (Build, Test, and Release) designed to validate the framework across multiple operating systems, browser providers, and execution environments.

Pipeline Overview and Triggers

The pipeline is configured to trigger on every branch push (excluding gh-pages) and on all tags azure-pipelines.yml6-17 Additionally, a scheduled "Weekly build" runs every Sunday at 18:00 UTC against the master branch azure-pipelines.yml18-24

VariableDefault ValueDescription
solution**/*.slnPath to the Ocaramba solution files azure-pipelines.yml27
buildConfigurationReleaseThe build configuration used for compilation and packaging azure-pipelines.yml29
frameworkVersion4.0.0Base version for NuGet packages; overridden by git tags during releases azure-pipelines.yml30
NUGET_PACKAGES$(Pipeline.Workspace)/.nuget/packagesCustom path for the NuGet cache azure-pipelines.yml34
seleniumGridUrlhttps://.../selenium-server-4.8.0.jarSource URL for the Selenium Grid standalone jar azure-pipelines.yml33

Sources: azure-pipelines.yml6-34


Stage 1: Build and Packaging

The build stage executes on a windows-latest agent. It handles versioning, dependency restoration, compilation, and artifact generation.

Versioning and Solution Pruning

If the build is triggered by a git tag, a PowerShell task extracts the latest tag using git tag --sort=-creatordate and updates the frameworkVersion variable azure-pipelines.yml44-51 A subsequent task uses regex to remove the Documentation project from Ocaramba.sln to streamline the build process and prevent SHFB build overhead during CI azure-pipelines.yml53-56

Dependency Management and Compilation

  1. NuGet Cache: The pipeline uses Cache@2 to store NuGet packages, keyed against packages.lock.json files azure-pipelines.yml60-68
  2. Assembly Info: The Assembly-Info-NetCore@2 task injects frameworkVersion into .csproj files, setting the PackageVersion, FileVersionNumber, and InformationalVersion azure-pipelines.yml75-89
  3. VSBuild: The solution is compiled using the VSBuild@1 task with minimal verbosity azure-pipelines.yml90-95

Artifact Generation

The pipeline publishes four primary NuGet artifacts as pipeline artifacts:

Sources: azure-pipelines.yml37-127


Stage 2: Parallel Test Execution

The test stage depends on the successful completion of the build stage azure-pipelines.yml130-131 It runs multiple parallel jobs to ensure cross-platform compatibility.

Docker and Selenium Grid

The RunTestsOnDocker job builds a custom Selenium image and orchestrates a local environment.

Multi-Platform Jobs

Ocaramba executes tests across various OS and provider combinations:

Job NameEnvironmentKey Tasks
RunTestsOnLinuxubuntu-latestInstalls google-chrome-stable, sets ASPNETCORE_ENVIRONMENT=Linux, and runs ExecutingTestsOnLinuxAzure.ps1 azure-pipelines.yml161-182
RunTestsOnLinuxBrowserStackubuntu-latestConnects to BrowserStack using mapped environment variables (MAPPED_ENV_BROWSERSTACKKEY) for credentials azure-pipelines.yml189-214
RunTestsOnWindowsAzurewindows-latestRuns standard Windows tests via ExecutingTestsOnWindowsAzure.ps1 azure-pipelines.yml216-231

Sources: azure-pipelines.yml133-231

Data Flow: From Code to Pipeline Execution

The following diagram illustrates how the pipeline variables and scripts interact with the codebase entities to execute tests.

Pipeline to Code Execution Flow


Sources: azure-pipelines.yml26-34 azure-pipelines.yml151-154 azure-pipelines.yml179-182


Stage 3: Release and NuGet.org Publishing

The final stage (Release) is typically gated by the success of all previous test jobs. It retrieves the .nupkg and .snupkg artifacts generated in the build stage and pushes them to NuGet.org.

Symbol Packages (snupkg)

The pipeline explicitly generates and publishes .snupkg files azure-pipelines.yml106-117 These symbol packages contain the PDB files necessary for consumers to step into Ocaramba source code during debugging, leveraging the SourceLink configuration defined in the project files.

Stage and Job Dependency Diagram


Sources: azure-pipelines.yml37-131 azure-pipelines.yml189-231

Environment Configuration via Pipeline

The pipeline uses environment variables to pass secrets and configuration to the test execution scripts. For instance, cloud provider credentials (BrowserStack, SauceLabs, TestingBot) are mapped from pipeline secrets to environment variables within the test jobs azure-pipelines.yml211-214 These are subsequently read by BaseConfiguration during DriverContext initialization.

Sources: azure-pipelines.yml210-214