woodpecker/pipeline
Elias bffc9c8ff8
fix: can't run multiple services on k8s (#3395)
Fix Issue: https://github.com/woodpecker-ci/woodpecker/issues/3288

The way the pod service starts up makes it impossible to run two or more
pipelines at the same time when we have a service section.

The idea is to set the name of the service in the same way we did for
the pod name.

Pipeline: 

```yaml

services:
  mydb:
    image: mysql
    environment:
      - MYSQL_DATABASE=test
      - MYSQL_ROOT_PASSWORD=example
    ports:
      - 3306/tcp
steps:
  get-version:
    image: ubuntu
    commands:
      - ( apt update && apt dist-upgrade -y && apt install -y mysql-client 2>&1 )> /dev/null
      - sleep 30s # need to wait for mysql-server init
      - echo 'SHOW VARIABLES LIKE "version"' | mysql -uroot -hmydb test -pexample
```

Running more than one pipeline result:


![image](https://github.com/woodpecker-ci/woodpecker/assets/22245125/e512309f-0d1e-4125-bab9-2357a710fedd)

---------

Co-authored-by: elias.souza <elias.souza@quintoandar.com.br>
2024-02-17 12:30:06 +01:00
..
backend fix: can't run multiple services on k8s (#3395) 2024-02-17 12:30:06 +01:00
errors Lint for event filter and deprecate exclude (#3222) 2024-02-10 17:33:05 +01:00
frontend Add link checking (#3371) 2024-02-12 15:00:33 +01:00
rpc Use assert for test (#3201) 2024-01-14 19:33:58 +01:00
shared Fix spelling in test description (#3198) 2024-01-13 15:24:13 +01:00
error.go Use UUID instead of step name where possible (#3136) 2024-01-09 05:43:03 +01:00
error_test.go Use assert for test (#3201) 2024-01-14 19:33:58 +01:00
logger.go Remove multipart logger (#3200) 2024-01-14 10:54:02 +01:00
option.go Rename engine to backend (#2950) 2023-12-14 19:20:47 +01:00
pipeline.go Remove multipart logger (#3200) 2024-01-14 10:54:02 +01:00
tracer.go Check for correct license header (#2137) 2023-08-10 11:06:00 +02:00