Deployment Flow

This page shows how an environment moves from a Jenkins job to a QA server. For job parameters, see Usage.

Parts of the System

  • Jenkins server: the central Jenkins installation with the web interface. It stores the environment files and runs no environment containers.

  • Agent: a helper Jenkins container on a QA server. The agent runs Docker Compose on that server.

  • Environment: a set of services with its own folder on the QA server.

Each agent connects to the Jenkins server. The Jenkins server does not connect to the agent. Several environments can run on one agent.

From Create to Running

Nothing starts automatically after Create or Update. A QA engineer runs each next job.

deployment-sequence

What Starts Each Job

Job Who starts it What it does

Create-Environment

A person

Writes the environment files on the Jenkins server.

Deploy-Environment

A person

Starts the environment on the selected agent.

Update-Environment

A person

Changes the environment files and creates a snapshot.

Manage-Environment

A person

Starts, stops, restarts or deletes an environment. Also changes its owners.

List-Environments

A person

Shows the environments.

Cleanup-Environments

A daily schedule

Removes environments after their time to live ends.

Cleanup-Images

A Jira Automation rule, when an issue moves to Done

Removes QA image tags from the Harbor registry.

Deployment Stages

Deploy-Environment runs these stages in order:

  1. Validate Images: checks the selected images.

  2. Capacity Gate: checks the resources on the agent.

  3. Save Runner: saves the selected agent.

  4. Transfer Config and Sync to Agent: copy the environment files to the agent.

  5. Prepare Agent: prepares the folders on the QA server.

  6. Deploy Services: starts the containers and waits for their health checks.

  7. Update Metadata: saves the new status in meta.json.

What Happens After a Failed Deployment

A failed deployment removes the containers and clears database data.

To keep this data for analysis, ask an administrator to set QA_KEEP_FAILED_STATE=true before the deployment.

For all actions, see What Stays and What You Lose.

Where the Files Are

Location Content

Jenkins server: /var/jenkins_home/qa-data/envs/<env>/

Source copy of the environment files and meta.json.

QA server: /opt/qa-envs/<env>/

Files for Docker Compose, and the service folders.

QA server: /opt/qa-envs/<env>/<service>/

Writable folders from the Compose file of this environment.

A deployment replaces your edits to docker-compose.yml and the .env files on the QA server. Change variables in Update-Environment, not on the QA server.