Add .env file for agent image version and update docker-compose.yml to use dynamic image versioning for TeamCity agents; introduce a new TeamCity agent configuration.

This commit is contained in:
2025-11-18 11:49:30 +01:00
parent 77d7439b6f
commit 313645f2c1
2 changed files with 23 additions and 7 deletions

1
.env Normal file
View File

@@ -0,0 +1 @@
AGENT_IMAGE_VERSION="2025.07.3-linux-sudo"

View File

@@ -1,5 +1,3 @@
version: '3.3'
networks:
devops:
name: devops
@@ -37,10 +35,7 @@ services:
- '/opt/buildagent/plugins:/opt/buildagent/plugins'
- '/opt/buildagent/temp:/opt/buildagent/temp'
- '/opt/buildagent/tools:/opt/buildagent/tools'
image: jetbrains/teamcity-agent:2025.07.1-linux-sudo
# image: jetbrains/teamcity-agent:2023.11.1-linux-sudo
# image: jetbrains/teamcity-agent:2023.05.2-linux-sudo
# image: jetbrains/teamcity-agent:latest
image: jetbrains/teamcity-agent:${AGENT_IMAGE_VERSION}
teamcity-agent-2:
restart: always
container_name: teamcity-agent-2
@@ -59,7 +54,27 @@ services:
- '/opt/buildagent/plugins2:/opt/buildagent/plugins'
- '/opt/buildagent/temp2:/opt/buildagent/temp'
- '/opt/buildagent/tools2:/opt/buildagent/tools'
image: jetbrains/teamcity-agent:2025.0.1-linux-sudo
image: jetbrains/teamcity-agent:${AGENT_IMAGE_VERSION}
teamcity-agent-3:
restart: always
container_name: teamcity-agent-3
environment:
- 'SERVER_URL=teamcity-server:8111'
- DOCKER_IN_DOCKER=start
user: root
privileged: true
networks:
- devops
volumes:
- '/teamcity/agent3:/teamcity_agent/conf'
- '/var/run/docker.sock:/var/run/docker.sock'
- '/opt/buildagent/system3:/opt/buildagent/system'
- '/opt/buildagent/work3:/opt/buildagent/work'
- '/opt/buildagent/plugins3:/opt/buildagent/plugins'
- '/opt/buildagent/temp3:/opt/buildagent/temp'
- '/opt/buildagent/tools3:/opt/buildagent/tools'
image: jetbrains/teamcity-agent:${AGENT_IMAGE_VERSION}
watchtower:
image: containrrr/watchtower
container_name: watchtower