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.
What Starts Each Job
| Job | Who starts it | What it does |
|---|---|---|
|
A person |
Writes the environment files on the Jenkins server. |
|
A person |
Starts the environment on the selected agent. |
|
A person |
Changes the environment files and creates a snapshot. |
|
A person |
Starts, stops, restarts or deletes an environment. Also changes its owners. |
|
A person |
Shows the environments. |
|
A daily schedule |
Removes environments after their time to live ends. |
|
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:
-
Validate Images: checks the selected images.
-
Capacity Gate: checks the resources on the agent.
-
Save Runner: saves the selected agent.
-
Transfer Config and Sync to Agent: copy the environment files to the agent.
-
Prepare Agent: prepares the folders on the QA server.
-
Deploy Services: starts the containers and waits for their health checks.
-
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: |
Source copy of the environment files and |
QA server: |
Files for Docker Compose, and the service folders. |
QA server: |
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.