WIP: Initial work on woodpecker ci. #152

Draft
valberg wants to merge 3 commits from woodpeckerci into main
Showing only changes of commit abba932693 - Show all commits

View file

@ -1,18 +1,18 @@
# vim: ft=yaml.ansible
---
- name: set up woodpecker with docker runner
- name: Set up Woodpecker CI with Docker runner
docker_compose:
project_name: woodpecker
pull: yes
pull: true
definition:
version: "3.6"
version: "3.8"
services:
woodpecker-server:
server:
image: "woodpeckerci/woodpecker-server:{{ services.woodpecker.server_version }}"
restart: unless-stopped
restart: always
networks:
- default
samsapti marked this conversation as resolved
Review

Unless you add purge_networks: yes the default network is implicitly added (IMHO an annoying default). I think we should either add purge_networks: yes or leave out default.

Unless you add `purge_networks: yes` the `default` network is implicitly added (IMHO an annoying default). I think we should either add `purge_networks: yes` or leave out `default`.
Review

default is needed for server to be able to communicate with the other Compose services. (Why is it an annoying default?)

`default` is needed for `server` to be able to communicate with the other Compose services. (Why is it an annoying default?)
- external_services
- woodpecker
volumes:
- "{{ services.woodpecker.volume_folder }}:/data"
- "/var/run/docker.sock:/var/run/docker.sock"
@ -23,24 +23,19 @@
WOODPECKER_GITEA_SECRET: "{{ woodpecker_secrets.oauth_client_secret }}"
WOODPECKER_HOST: "https://{{ services.woodpecker.domain }}"
WOODPECKER_AGENT_SECRET: "{{ woodpecker_secrets.agent_secret }}"
VIRTUAL_HOST: "{{ services.woodpecker.domain }}"
LETSENCRYPT_HOST: "{{ services.woodpecker.domain }}"
LETSENCRYPT_EMAIL: "{{ letsencrypt_email }}"
woodpecker-agent:
agent:
image: "woodpeckerci/woodpecker-agent:{{ services.woodpecker.agent_version }}"
restart: unless-stopped
networks:
- woodpecker
restart: always
volumes:
- "/var/run/docker.sock:/var/run/docker.sock"
environment:
WOODPECKER_SERVER: "woodpecker-server:9000"
WOODPECKER_SERVER: "server:9000"
WOODPECKER_AGENT_SECRET: "{{ woodpecker_secrets.agent_secret }}"
networks:
woodpecker:
external_services:
external:
name: external_services
external: true