name env tests differently, add sleep statements to help produce cleaner logs

This commit is contained in:
Merith-TK 2024-12-28 17:32:02 +00:00
parent 7fdae1d6e4
commit 261e3e7560
2 changed files with 11 additions and 7 deletions

View file

@ -19,7 +19,7 @@ volumes:
services: services:
docker-in-docker: docker-in-docker-envs:
image: code.forgejo.org/oci/docker:dind image: code.forgejo.org/oci/docker:dind
hostname: docker # Must set hostname as TLS certificates are only valid for docker or localhost hostname: docker # Must set hostname as TLS certificates are only valid for docker or localhost
privileged: true privileged: true
@ -29,7 +29,7 @@ services:
volumes: volumes:
- docker_certs:/certs - docker_certs:/certs
forgejo: forgejo-envs:
image: codeberg.org/forgejo/forgejo:1.21 image: codeberg.org/forgejo/forgejo:1.21
command: >- command: >-
bash -c ' bash -c '
@ -50,11 +50,11 @@ services:
ports: ports:
- 8080:3000 - 8080:3000
runner-register: runner-register-envs:
image: code.forgejo.org/forgejo/runner:3.4.1 image: code.forgejo.org/forgejo/runner:3.4.1
links: links:
- docker-in-docker - docker-in-docker-envs
- forgejo - forgejo-envs
environment: environment:
DOCKER_HOST: tcp://docker-in-docker:2376 DOCKER_HOST: tcp://docker-in-docker:2376
volumes: volumes:
@ -62,6 +62,7 @@ services:
user: 0:0 user: 0:0
command: >- command: >-
bash -ec ' bash -ec '
sleep 15 ;
while : ; do while : ; do
forgejo-runner create-runner-file --connect --instance http://forgejo:3000 --name runner --secret {SHARED_SECRET} && break ; forgejo-runner create-runner-file --connect --instance http://forgejo:3000 --name runner --secret {SHARED_SECRET} && break ;
sleep 1 ; sleep 1 ;
@ -74,8 +75,8 @@ services:
runner-daemon-envs: runner-daemon-envs:
image: code.forgejo.org/forgejo/runner:3.4.1 image: code.forgejo.org/forgejo/runner:3.4.1
links: links:
- docker-in-docker - docker-in-docker-envs
- forgejo - forgejo-envs
environment: environment:
DOCKER_HOST: tcp://docker:2376 DOCKER_HOST: tcp://docker:2376
DOCKER_CERT_PATH: /certs/client DOCKER_CERT_PATH: /certs/client
@ -96,5 +97,6 @@ services:
- docker_certs:/certs - docker_certs:/certs
command: >- command: >-
bash -c ' bash -c '
sleep 15 ;
while : ; do test -w .runner && forgejo-runner --config config.yml daemon ; sleep 1 ; done while : ; do test -w .runner && forgejo-runner --config config.yml daemon ; sleep 1 ; done
' '

View file

@ -62,6 +62,7 @@ services:
user: 0:0 user: 0:0
command: >- command: >-
bash -ec ' bash -ec '
sleep 15 ;
while : ; do while : ; do
forgejo-runner create-runner-file --connect --instance http://forgejo:3000 --name runner --secret {SHARED_SECRET} && break ; forgejo-runner create-runner-file --connect --instance http://forgejo:3000 --name runner --secret {SHARED_SECRET} && break ;
sleep 1 ; sleep 1 ;
@ -89,5 +90,6 @@ services:
- docker_certs:/certs - docker_certs:/certs
command: >- command: >-
bash -c ' bash -c '
sleep 15 ;
while : ; do test -w .runner && forgejo-runner --config config.yml daemon ; sleep 1 ; done while : ; do test -w .runner && forgejo-runner --config config.yml daemon ; sleep 1 ; done
' '