TECHNICAL CASE STUDY · DevOps · Delivery engineering

Infrastructure & release automation

From source to an operable system.

Implemented tooling · final desktop qualification remained open

FROM THE IMPLEMENTATION

Verify the deployment belongs to the source pipeline

Python · SELECTED SOURCE
def verify_bridge(bridges, downstream_id):
    """Prove that the successful upstream gates triggered this deployment pipeline."""
    matching = [bridge for bridge in bridges if bridge.get("name") == "deploy_custom_website"]
    require(len(matching) == 1, "Missing or ambiguous deployment bridge")
    bridge = matching[0]
    require(bridge.get("status") == "running", "Deployment bridge is not running")
    downstream = bridge.get("downstream_pipeline") or {}
    require(downstream.get("id") == int(downstream_id), "Deployment pipeline is not linked")
    require(downstream.get("web_url") == f"{DEPLOY_URL}/-/pipelines/{downstream_id}",
            "Deployment bridge points at another project")
PulseNodeManagerDeploy/scripts/verify_source.py

Selected complete helper. The upstream bridge must be unique, running and linked to this exact downstream pipeline and project before delivery proceeds. The surrounding verifier also checks protected source identity and required jobs.

THE ENGINEERING PROBLEM

What needed to work

A successful build is only the first handoff in delivering a desktop application. The website, downloadable clients, installed package and qualification run must refer to the same candidate. I built delivery tooling that carries source and artifact identity through those boundaries instead of trusting a mutable branch or a caller’s metadata.

Constraints and requirements

  • The application integrates upstream execution and consensus clients across different operating systems and architectures. A cross-compiled executable proves a build result; it does not establish that an installed desktop application starts or synchronizes.
  • Deployment credentials stay in the delivery project. Source pipelines trigger bounded operations, while production website deployment and retained-host qualification have their own permissions, resource ownership and observable results.

ARCHITECTURE & DESIGN

How the system fits together

  1. Source + immutable revision
  2. Pinned client builds + packages
  3. Provenance verification
  4. Versioned HTTPS deployment
  5. Installed-artifact qualification

Shared Docker Bake recipes provide controlled client toolchains and export binaries with deterministic receipts. GitLab CI checks the source, builds packages and retains the candidate before downstream deployment consumes the verified immutable revision.

An Ansible role publishes versioned website directories behind Nginx and HTTPS. A current symlink selects the active version. Separate qualification orchestration consumes the unchanged bundle on retained desktop hosts, with phase records and cleanup boundaries.

Decisions and tradeoffs

Discover release provenance from verified GitLab relationships.

The downstream verifier checks the protected tag, source revision, required jobs and the bridge connecting source and deployment pipelines before downloading.

Tradeoff This adds API and pipeline complexity. Missing or ambiguous evidence blocks delivery instead of accepting convenient but unverifiable release metadata.

Keep reproducible builds and native qualification as separate jobs.

Pinned toolchains and uncached byte comparisons address build consistency; real desktops address installation, elevation, virtualization and recovery.

Tradeoff Retained-host work costs more time and coordination. Keeping the boundary explicit prevents a green build from being mistaken for completed platform support.

Own qualification processes before allowing their entrypoint to run.

A gated supervisor establishes a POSIX process group or Windows job before release. Launch failure, deadline and cancellation paths clean that owned tree and close pipes before another phase can start.

Tradeoff Platform-specific supervision is more involved than waiting for one PID, but makes descendant cleanup part of the result rather than an unverified hope.

PLANNING & EXECUTION

From requirements to working behavior

  1. I implemented a read-only access preflight that precedes release work and repeats before deployment. The production flow is serialized, verifies trusted host access and checks the resulting HTTPS metadata and website assets against the selected source.
  2. Website releases remain available for a reviewed rollback by selecting a known-good version through Ansible. Runtime metadata avoids stale caching, so a browser can identify the deployed revision without relying on the appearance of the page.
  3. A candidate lease checks release-candidate ordering and stops the current host transport when newer work supersedes it. Source verification and candidate ordering remain separate checks: neither a caller-provided revision nor a long-running older job silently becomes the current candidate.

VALIDATION & RECOVERY

How the behavior is checked

  • The maintained suites cover source verification, access and HTTPS probes, live-site comparison, qualification journals and process lifetime. Controlled builds check executable format, embedded revision and clean-rebuild equality; host tests own the separate installed-application evidence.

Implementation references

Repository-relative references identify the implementation behind this case study. Selected code excerpts are also available in the portfolio.

  • PulseNodeManagerDeploy/README.md
  • PulseNodeManagerDeploy/scripts/verify_source.py
  • PulseNodeManagerDeploy/scripts/check_live_site.py
  • PulseNodeManagerDeploy/roles/pulse_node_manager_site/tasks/main.yml
  • PulseNodeManager/client-builds/README.md
  • PulseNodeManager/client-builds/docker-bake.hcl
  • PulseNodeManagerDeploy/qualification/process_runner.py: run_owned
  • PulseNodeManagerDeploy/qualification/process_supervisor.py
  • PulseNodeManagerDeploy/qualification/windows_job.py: WindowsJob
  • PulseNodeManagerDeploy/scripts/qualification_lease.py
  • PulseNodeManagerDeploy/scripts/tests/test_process_lifetime.py
  • PulseNodeManagerDeploy/scripts/tests/test_qualification_lease.py