Reduce redundancy of drone setup
This commit is contained in:
parent
d9ace95328
commit
269f8b89e9
3 changed files with 36 additions and 21 deletions
|
@ -0,0 +1,23 @@
|
||||||
|
services:
|
||||||
|
ci:
|
||||||
|
build:
|
||||||
|
context: .
|
||||||
|
dockerfile: ci.Dockerfile
|
||||||
|
restart: unless-stopped
|
||||||
|
env_file:
|
||||||
|
- server.common.env
|
||||||
|
docker:
|
||||||
|
image: drone/drone-runner-docker
|
||||||
|
restart: unless-stopped
|
||||||
|
env_file: runner.common.env
|
||||||
|
environment:
|
||||||
|
DRONE_RUNNER_NAME: docker-runner
|
||||||
|
volumes:
|
||||||
|
- /var/run/docker.sock:/var/run/docker.sock
|
||||||
|
ssh:
|
||||||
|
image: drone/drone-runner-ssh
|
||||||
|
restart: unless-stopped
|
||||||
|
env_file:
|
||||||
|
- runner.common.env
|
||||||
|
environment:
|
||||||
|
DRONE_RUNNER_NAME: ssh-runner
|
|
@ -1,27 +1,19 @@
|
||||||
services:
|
services:
|
||||||
ci-template:
|
ci-template:
|
||||||
build:
|
extends:
|
||||||
context: .
|
file: docker-compose.core.yml
|
||||||
dockerfile: ci.Dockerfile
|
service: ci
|
||||||
restart: unless-stopped
|
env_file: []
|
||||||
env_file:
|
|
||||||
- server.common.env
|
|
||||||
environment: {}
|
environment: {}
|
||||||
docker-template:
|
docker-template:
|
||||||
image: drone/drone-runner-docker
|
extends:
|
||||||
restart: unless-stopped
|
file: docker-compose.core.yml
|
||||||
|
service: docker
|
||||||
depends_on: []
|
depends_on: []
|
||||||
env_file:
|
env_file: []
|
||||||
- runner.common.env
|
|
||||||
environment:
|
|
||||||
DRONE_RUNNER_NAME: docker-runner
|
|
||||||
volumes:
|
|
||||||
- /var/run/docker.sock:/var/run/docker.sock
|
|
||||||
ssh-template:
|
ssh-template:
|
||||||
image: drone/drone-runner-ssh
|
extends:
|
||||||
restart: unless-stopped
|
file: docker-compose.core.yml
|
||||||
|
service: ssh
|
||||||
depends_on: []
|
depends_on: []
|
||||||
env_file:
|
env_file: []
|
||||||
- runner.common.env
|
|
||||||
environment:
|
|
||||||
DRONE_RUNNER_NAME: ssh-runner
|
|
||||||
|
|
|
@ -19,7 +19,7 @@ begin
|
||||||
echo "{}" | sudo tee "$config" >/dev/null
|
echo "{}" | sudo tee "$config" >/dev/null
|
||||||
echo "{}" | sudo tee "$secrets" >/dev/null
|
echo "{}" | sudo tee "$secrets" >/dev/null
|
||||||
|
|
||||||
cp "$dir"/{ci.Dockerfile,.dockerignore} "$root"
|
cp "$dir"/{ci.Dockerfile,docker-compose.core.yml,.dockerignore} "$root"
|
||||||
echo "DRONE_JSONNET_ENABLED=true" | sudo tee "$root/server.common.env" >/dev/null
|
echo "DRONE_JSONNET_ENABLED=true" | sudo tee "$root/server.common.env" >/dev/null
|
||||||
echo "DRONE_RUNNER_CAPACITY=2" | sudo tee "$root/runner.common.env" >/dev/null
|
echo "DRONE_RUNNER_CAPACITY=2" | sudo tee "$root/runner.common.env" >/dev/null
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue