@@ -14,6 +14,8 @@ services:
14
14
volumes :
15
15
- agent-ssh-dir:/ssh-dir # Mounts the agent-ssh-dir volume to the /ssh-dir path inside the container
16
16
# The healthcheck command checks if the conductor_ok file exists in the /ssh-dir directory.
17
+ networks :
18
+ - jenkins-net
17
19
healthcheck :
18
20
test : ["CMD-SHELL", "[ -f /ssh-dir/conductor_ok ] || exit 1"]
19
21
# Checks if the conductor_ok file exists in the /ssh-dir path
@@ -38,6 +40,8 @@ services:
38
40
- dotnet
39
41
- default
40
42
# This service depends on the sidekick_service (generating SSH keys and JCasc token) completing successfully.
43
+ networks :
44
+ - jenkins-net
41
45
depends_on :
42
46
sidekick_service :
43
47
condition : service_completed_successfully # Depends on the successful completion of the sidekick_service
@@ -76,6 +80,10 @@ services:
76
80
# Mounting the token as "container secret" makes it available in JCasc as the variable ${CASC_RELOAD_TOKEN}
77
81
- ./secrets/jcasc_token:/run/secrets/CASC_RELOAD_TOKEN:ro
78
82
# This service depends on the sidekick_service (generating SSH keys and JCasc token) completing successfully.
83
+ networks :
84
+ jenkins-net :
85
+ aliases :
86
+ - jenkins_controller # Add secondary alias
79
87
depends_on :
80
88
sidekick_service :
81
89
condition : service_completed_successfully # Depends on the successful completion of the sidekick_service
@@ -97,6 +105,8 @@ services:
97
105
- empty_jenkins_home:/var/jenkins_home # Mounts the jenkins_home volume to the /var/jenkins_home path inside the container
98
106
- agent-ssh-dir:/ssh-dir # Mounts the agent-ssh-dir volume to the /app path inside the container
99
107
# This service depends on the sidekick_service (generating SSH keys and JCasc token) completing successfully.
108
+ networks :
109
+ - jenkins-net
100
110
depends_on :
101
111
sidekick_service :
102
112
condition : service_completed_successfully # Depends on the successful completion of the sidekick_service
@@ -115,6 +125,8 @@ services:
115
125
container_name : desktop-jenkins_agent-1
116
126
profiles :
117
127
- default
128
+ networks :
129
+ - jenkins-net
118
130
depends_on :
119
131
sidekick_service :
120
132
condition : service_completed_successfully # Depends on the successful completion of the sidekick_service
@@ -133,6 +145,8 @@ services:
133
145
container_name : desktop-jenkins_agent-1
134
146
profiles :
135
147
- wizard
148
+ networks :
149
+ - jenkins-net
136
150
depends_on :
137
151
sidekick_service :
138
152
condition : service_completed_successfully # Depends on the successful completion of the sidekick_service
@@ -145,6 +159,8 @@ services:
145
159
container_name : desktop-jenkins_agent-1-maven
146
160
profiles :
147
161
- maven
162
+ networks :
163
+ - jenkins-net
148
164
depends_on :
149
165
sidekick_service :
150
166
condition : service_completed_successfully # Depends on the successful completion of the sidekick_service
@@ -163,6 +179,8 @@ services:
163
179
container_name : desktop-jenkins_agent-1-python
164
180
profiles :
165
181
- python
182
+ networks :
183
+ - jenkins-net
166
184
depends_on :
167
185
sidekick_service :
168
186
condition : service_completed_successfully # Depends on the successful completion of the sidekick_service
@@ -183,6 +201,8 @@ services:
183
201
container_name : desktop-jenkins_agent-1-node
184
202
profiles :
185
203
- node
204
+ networks :
205
+ - jenkins-net
186
206
depends_on :
187
207
sidekick_service :
188
208
condition : service_completed_successfully # Depends on the successful completion of the sidekick_service
@@ -205,6 +225,8 @@ services:
205
225
container_name : desktop-jenkins_agent-1-android
206
226
profiles :
207
227
- android
228
+ networks :
229
+ - jenkins-net
208
230
depends_on :
209
231
sidekick_service :
210
232
condition : service_completed_successfully # Depends on the successful completion of the sidekick_service
@@ -227,6 +249,8 @@ services:
227
249
- " 8080:8080"
228
250
profiles :
229
251
- multi
252
+ networks :
253
+ - jenkins-net
230
254
volumes :
231
255
- jenkins_home:/var/jenkins_home # Mounts the jenkins_home volume to the /var/jenkins_home path inside the container
232
256
- agent-ssh-dir:/ssh-dir # Mounts the agent-ssh-dir volume to the /app path inside the container
@@ -246,6 +270,8 @@ services:
246
270
container_name : desktop-jenkins_agent-1-multi
247
271
profiles :
248
272
- multi
273
+ networks :
274
+ - jenkins-net
249
275
depends_on :
250
276
sidekick_service :
251
277
condition : service_completed_successfully # Depends on the successful completion of the sidekick_service
@@ -269,6 +295,8 @@ services:
269
295
container_name : desktop-jenkins_agent-1-golang
270
296
profiles :
271
297
- golang
298
+ networks :
299
+ - jenkins-net
272
300
depends_on :
273
301
sidekick_service :
274
302
condition : service_completed_successfully # Depends on the successful completion of the sidekick_service
@@ -291,6 +319,8 @@ services:
291
319
container_name : desktop-jenkins_agent-1
292
320
profiles :
293
321
- cpp
322
+ networks :
323
+ - jenkins-net
294
324
depends_on :
295
325
sidekick_service :
296
326
condition : service_completed_successfully # Depends on the successful completion of the sidekick_service
@@ -313,6 +343,8 @@ services:
313
343
container_name : desktop-jenkins_agent-1
314
344
profiles :
315
345
- dotnet
346
+ networks :
347
+ - jenkins-net
316
348
depends_on :
317
349
sidekick_service :
318
350
condition : service_completed_successfully # Depends on the successful completion of the sidekick_service
@@ -333,3 +365,8 @@ volumes:
333
365
empty_jenkins_home : null
334
366
agent-ssh-dir :
335
367
name : agent-ssh-dir # Creates a named volume called agent-ssh-dir
368
+
369
+ networks :
370
+ jenkins-net :
371
+ driver : bridge
372
+ attachable : true
0 commit comments